The current API may return an arbitrary count of 100000000 for large collections (tables). This doesn’t mean that the collection doesn’t contain more records. We have an open change request to augment this behavior and return null in such cases (as the returned value cannot be trusted).
We recommend implementing “blind iteration” even before mentioned change is implemented, as it will allow to fetch all records with the current as well as future API implementations.
Blind Iteration Pseudo-Code
limit=500start=0returned_count=limitwhilereturned_count==limitdobatch,returned_count=fetch_data(start,limit)start+=returned_count# process returned batchend