title: How can I get FOUND_ROW()s from an active record object in rails?
body: <p>When querying the database with:</p>
  
  <pre><code>@robots = Robot.all(:condition =&gt; [:a =&gt; 'b'], :limit =&gt; 50, :offset =&gt; 0)
  </code></pre>
  
  <p>What is the best way to get the total number of rows without the <code>:limit</code>?</p>
  
  <p>In raw MySQL you could do something like this:</p>
  
  <pre><code>SELECT SQL_CALC_FOUND_ROWS * FROM robots WHERE a=b LIMIT 0, 50
  SELECT FOUND_ROWS();
  </code></pre>
  
  <p>Is there an active record way of doing this?</p>