Requested feature overview description.
I propose that some form of XML's count attribute given to <posts> be added to the JSON API for post listing (/post/index.json). There might be other metadata that would be useful to include as well, but I feel that count is the most essential.
Why would it be useful?
Responses from queries to /post/index.xml include a count attribute in the top-level posts element. This is useful for performing calculating things such as how many pages of results were returned for a given 'limit' parameter.
There is the similar post_count field returned when querying /pool/show.json, allowing one to calculate how many pages need to be loaded to retrieve all the posts in the pool. Otherwise there would be no way to know if the pool is a single page or not.
However, this is not the case when querying /post/index.json - it lists all the responses, but gives no way to determine if further pages are available or not. The only way to determine that is to either detect when the number of returned posts is lower than 'limit', or to make one search request with the XML API just to get that single number.
What part(s) of the site page(s) are affected?
Posts, index
________________________________
It appears that @TonyLemur had, five years ago, stated they would attempt to address this. I don't know if it was addressed and its disappearance is a regression, or if this feature request has effectively been around for 5 years.
Updated by KiraNoot