CXone Analytics API paging logic broken for large datasets

Trying to paginate through /api/v2/analytics/interactions/summary. The response gives me a paging object with pageSize 200 and pageCount 50. I loop through pageNumber 1 to 50. The last page returns 200 items. I expect the total count to match the sum of all pages. It doesn’t. The API seems to ignore the totalCount field in the response. How do I handle the remainder correctly?

Docs state: “The totalCount is an estimate and should not be used for precise calculations.” You’re likely hitting a race condition if data changes during pagination. Never trust totalCount for exact counts. Use nextPageToken instead.

while page_token:
 resp = client.get_analytics_interactions_summary(page_token=page_token)
 page_token = resp.paging.nextPageToken