More generally, the problem can be stated as follows:
If you have n posts, how many sections are there between them?
The correct answer may be n − 1 if the line of posts is open-ended, n if they form a loop, or n + 1 if the posts do not occur at the end of the fence (for instance if the fence runs between two walls).
I don't understand the emboldened sentence. Can someone please illustrate it?