title: How to get the number of rows of the selected result from sqlite3?
body: <p>I want to get the number of selected rows as well as the selected data. At the present I have to use two sql statements: </p>
  
  <p>one is </p>
  
  <pre><code>select * from XXX where XXX;
  </code></pre>
  
  <p>the other is </p>
  
  <pre><code>select count(*) from XXX where XXX; 
  </code></pre>
  
  <p>Can it be realised with a single sql string?</p>
  
  <p>I've checked the source code of sqlite3, and I found the function of <code>sqlite3_changes()</code>. But the function is only useful when the database is changed (after <code>insert, delete or update</code>). </p>
  
  <p>Can anyone help me with this problem? Thank you very much!</p>