Get the total number of pages for search params