Fix to lastItemNumber in Paginator

Since the cursor returns the wrong count, we return an array. I have
updated the unit test to work with array return type. There is a new
unit test to test the counts.