Get the Count of Users without using pagination


I’m new to Okta. As I was looking at okta docs and i couldn’t find a most elegant way to get users count without looping through and making multiple calls to okta.

I was using this approach of getting response from “/api/v1/users”, which would only give us 200 users along with a “next” value. And i was using that “next” Value and making another call to okta and so on untill there is no “next” value.

Please let me know if there is a nicer approach to resolve this problem.