The search endpoint's response should include information about the total number of hits so the client can decide whether to fetch a next page of results.
totalCount is implemented in the REST API as part of /search API responses. Support for this new response field is in the works for the Typescript SDK .