For any PageArray, count($pageArray) returns the number if items present now, but $pageArray->getTotal() returns the number of items total without pagination. So if you specified a "limit=n" in your selector when loading the pages, you can always call upon that $pages->getTotal() to tell you how many matched in total.
There is also a $pageArray->getStart() method, which tells you the index of the first item. So if you had specified "limit=10" and you were on page2 in the pagination, then getStart() would return 10.
I use these two functions to output a summary of results that tells you were you are. So if you wanted a headline that said this:
Firms with more than 100 staff
Showing firms 1 - 10 of 95
ACME Inc. has 190 staff
Discount Webdev has 155 staff
...
[1] [2] [3] [4] [5] ...
You'd do something like this:
$firms = $pages->find('parent=/firms/, num_staff>100, limit=10');
$start = $firms->getStart() + 1;
$end = $firms->getStart() + count($firms);
$total = $firms->getTotal();
echo "<h1>Firms with more than 100 staff</h1>";
echo "<h2>Showing firms $start - $end of $total</h2>";
foreach($firms as $firm) {
echo "<p>{$firm->title} has {$firm->num_staff} staff</p>";
}
// output the pagination links
echo $firms->renderPager();