If you just want the **total**, don't bother paging through the entire full result set.  
Use the `total` property of [the Common Wrapper Object][1].  This will save lots of time and bandwidth and quota and doesn't require you to loop through the results just to count things.
  
The `total` property is not enabled by default, so you will need to [Create a custom filter][2] for your queries. ([You should do this anyway, to speed your app up.][3])

Here's how it looks for that `/users/{ids}/answers` route:  
[/users/2440312/answers?site=stackoverflow&filter=!.UE8F0_EMkjmCAGv][4]

Which currently yields:

    {
      "has_more": false,
      "quota_max": 10000,
      "quota_remaining": 9993,
      "page": 1,
      "page_size": 30,
      "total": 41,
      "type": "answer"
    }

----------
Unfortunately, the API does not do subtotals.  So if you fetch more than one user at a time, this streamlined method will not work. (EG: [this two-user request][5] yields `total` = 3663 (at least 37 pages of answers) with no way to tell which user has which without paging through your original-style query.)


  [1]: https://api.stackexchange.com/docs/wrapper
  [2]: https://stackapps.com/a/4491/7653
  [3]: https://api.stackexchange.com/docs/filters
  [4]: https://api.stackexchange.com/users/2440312/answers?site=stackoverflow&filter=!.UE8F0_EMkjmCAGv
  [5]: https://api.stackexchange.com/users/2440312%3B12579/answers?site=stackoverflow&filter=!.UE8F0_EMkjmCAGv