Summary
There are (y-x) fenceposts in [x, y]
There are (y-x) elements in [x, y)
It is often easiest to represent a range by the first element in it and the first element beyond it
It is useful to check for fencepost errors by using empty ranges (or ranges with only one element)