Avoid fetching all SOLR records when performing count.