"... I would rather store the search term in the session and check for it everytime the page is loaded. If the user accesses the page without pagination info, e.g. /search you can reset the term as he probably wants to search for something else. If he navigates back to page x, e.g. /search/x you can use the search term from the session to determine how many search results there are.
Another solution would be to save the performed search in your database and generate a unique key for each search. Then you can just pass the unique key in the url and use that..."