title: SQL - Get list of messages as well as a count value
body: <p>I have a page that lists messages using the SQL as follows:</p>
  
  <pre><code>SELECT * FROM comments $qwhere ORDER BY comment_date DESC LIMIT $qstart,$qlimit
  </code></pre>
  
  <p>How can I also retrieve the number of messages that share the same <code>comment_number</code> (this is not the primary key of the table, just a number type column) on a row by row basis i.e.</p>
  
  <pre><code>SELECT count(something), * ... FROM comments
  </code></pre>