title: How to get FireDAC record count when SetRange active
body: <p>I'm slowly moving from ClientDataSet to FireDAC FDQuery components in my projects (Delphi 10 Seattle).</p>
  
  <p>One trick I often use with CDS is to check record count on a range.</p>
  
  <p>That is:  </p>
  
  <pre><code>CDS.SetRange([Value1][Value2]);  
  k := CDS.RecordCount;  
  case k of  
    1 : DoSingleThing;  
    2 : DoDoubleThing;  
  else  
    BailOnWrongCount;  
  end;  
  </code></pre>
  
  <p>Because I need the entire set of data available at the same time, I use FetchOptions.Mode := fmAll when first opening the query.  </p>
  
  <p>Doing  <code>FDQuery.SetRange([Value1][Value2]);</code> then calling <code>FDQuery.RecordCount</code> always returns the record count of the entire dataset (as per fmAll) - not the current range.  </p>
  
  <p>I'm having to loop through the range counting records manually.</p>
  
  <p>Is there a simpler way to get the number of records in the current range?</p>