That's exactly what the scroll api is used for.
It is designed to return a much larger or all of your results in a paginated format. Whereas a simple search will stop after 10,000 results (by default) a scroll can return all.
Scrolling essentially paginates your results so that you can create multiple pages of search results.
If you just want to know the number of hits you can use scroll but it is not intended for regular use as it can be quite resource intensive as a scroll search context is saved each time you run it.