title: How to count results in sphinx?
body: <p>I have to deal with queries that have lots of results, but I only show them in sets of 20-30 rows.</p>
  
  <p>Then I use the SetLimits() method from the php API.</p>
  
  <p>But I need to know what's the total number of results, to calculate the number of pages (or sets of results)</p>
  
  <p>The only way I can do this right now is pulling all the results by setting the limit to 10000000 and see what is in the 'total' key of the array returned by sphinx, but this isn't good because I only need the count() number, I don't wan't sphinx to create a huge array with all the id's.</p>
  
  <p>Performing a select..count() query in mysql won't work, because the indexed data in sphinx is always different.</p>
  
  <p>Any ideas?</p>