title: How to count all rows when using SELECT with LIMIT in MySQL query?
body: <p>I've got a mysql query like this:</p>
  
  <pre><code>SELECT A.ID, A.NAME, B.ID, B.NAME
  FROM table1 A
  JOIN table2 B ON ( A.ID = B.TABLE1_ID )
  WHERE
      cond1, cond2, ..., condN
  LIMIT 10
  </code></pre>
  
  <p>I've got many where clauses in query.
  How to improve this query to get also full row count?
  I don't want to use one more request without LIMIT.</p>