Counting seems to overcount by 1 per line, possibly due to the 'end' datum that we include so that our pointer doesn't overrun (actually I can't quite remember why I put that in.)