Pagination Behavior for list api

Hi,

We have a question on the functionality of the 'List' api (GET). We need to understand the behavior for pagination.

For the scenario:

https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=1&count=5


We see the following response:

{
$url: "">cloud.na.sagecrm.com/.../Address
$first: "">cloud.na.sagecrm.com/.../Address
$next: "">cloud.na.sagecrm.com/.../Address
$last: "">cloud.na.sagecrm.com/.../Address
$totalResults: 8
$startIndex: 1 .....

Considering that we have only 8 items in our result, our 'next' should be same as 'last'. But, we see a difference in the startindex values (for next, startindex is 6, and for last, startindex is 5). As per our understanding, next and last urls have to be same in such a scenario. Is there something we miss in our understanding? How is the startindex determined for the $last url ?


Thanks,

Harish