Fix regression in fadc4b3d; total_count is not the same as total_pages

Fixes #958. This is the expedient thing to revert, but maybe there's a better approach. @jcoyne?
Please document the return values for this method.  This class is a bit confusing and more documentation would be helpful.