The reason is that google only estimates how many results are available. As you load each page it refines the estimate, and so the number of pages changes.
You can check the estimatedResultCount property of the customSearchControl.searcher.cursor object, but unfortunately it won't help you because that's just the estimate the CSE uses to generate the pagination itself. (As each page is loaded, it will change to the new estimate.) There's also a resultCount property, but I believe it's for backward compatibility, as it is always equal to estimatedResultCount.
Unfortunately, the CSE is also not smart enough to remember its estimate. So you can start with an estimate of 127, go to the last page and have it be 94, then go to the second-to-last page and have it be 120, even though it should know at that point that it can't be more than 94. So I guess if you really wanted to you could make your own pagination that at least keeps track of the minimal value. It appears that's generally (always?) on the last page, so if it needed to be as good as possible, you could programmatically load the last page, take the estimate to build your pagination, then switch back to the first page for the user.
If you decide to go that route, you can build your own pagination using the customSearchControl.searcher.cursor.gotoPage(page) function. (https://developers.google.com/web-search/docs/reference#_class_GSearch)