Solr search, number of results
The link given is a nice one to deal with the default search result number count. In Apache Solr you can use the following code to get the total number of documents returned in the search result.

if (apachesolr_has_searched() &amp;&amp; ($response = apachesolr_static_response_cache())) {
  $returned_doc_num = $response-&gt;response-&gt;numFound;
}