title: How to use count and group by at the same select statement
body: <p>I have an SQL <code>SELECT</code> query that also uses a <code>GROUP BY</code>,
  I want to count all the records after the <code>GROUP BY</code> clause filtered the resultset.</p>
  <p>Is there any way to do this directly with SQL? For example, if I have the table <code>users</code> and want to select the different towns and the <b>total</b> number of users:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT `town`, COUNT(*)
  FROM `user`
  GROUP BY  `town`;
  </code></pre>
  <p>I want to have a column with all the towns and another with the number of users in all rows.</p>
  <p>An example of the result for having 3 towns and 58 users in total is:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Town</th>
  <th>Count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Copenhagen</td>
  <td>58</td>
  </tr>
  <tr>
  <td>New York</td>
  <td>58</td>
  </tr>
  <tr>
  <td>Athens</td>
  <td>58</td>
  </tr>
  </tbody>
  </table>
  </div>