> The only other way to determine the amount of documents returned it to JSON parse the entire result which is not free and would add latency to each request.
Why do they have to bill synchronously (in realtime)? Why not return the response, then calculate the fee asynchronously? The customer is probably being billed at discrete intervals (e.g., weekly or monthly) anyway.