Pagination doesn’t require a total page count to still be useful. You might remember Google’s UI in its first 10 years or so, which had pagination but not a total page count (if the number of pages exceeded 10 or so). You can use a ellipsis or a word like “many” and people will easily understand.
These day they just estimate the size of the resultset. It's pretty easy to come up with queries where it estimates the wrong row count until you paginate to a later page. I think the theory is just that approximately nobody clicks on more than the third page.
Example on first try: https://www.google.com/search?q=foobarfrak navigate to the last result. And you get a really misleading "No results containing all your search terms were found." page...
Also, I hate pagination in almost every case.