Best pagination approach for a REST Api that fetches logs from Elastic

If I have all my application logs being pushed to Elastic via Filebeats -> Logstash pipeline.We have a facing public API where customers can call this API 24*7 to fetch the logs. Currently our api takes these optional query params of fromDate, toDate, pageNumber and pageSize. I believe ES has the limitation of showing max 10K documents from the search at 1 shot. Now during the search window the documents may change. Now we have a requirement to show customers the total count.which could be a costly operation if we need to fetch the count on every paginated call. I was thinking about caching the result for some time. Are there any other better options for it? Also on the pagination approach we are using the from and size way of fetching the results. Any suggestions?