title: How to get total number of potential results in Lucene
body: <p>I'm using lucene on a site of mine and I want to show the total result count from a query, for example:</p>
  
  <blockquote>
    <p>Showing results <em>x</em> to <em>y</em> of <em>z</em></p>
  </blockquote>
  
  <p>But I can't find any method which will return me the total number of <em>potential</em> results. I can only seem to find methods which you have to specify the number of results you want, and since I only want 10 per page it seems logical to pass in 10 as the number of results.</p>
  
  <p>Or am I doing this wrong, should I be passing in say 1000 and then just taking the 10 in the range that I require?</p>