title: mysql count duplicates
body: <p>How can I count duplicated rows within the <code>select</code> statement?</p>
  <p>Here is my table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>name</th>
  <th>food</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>Apple</td>
  </tr>
  <tr>
  <td>B</td>
  <td>Banana</td>
  </tr>
  <tr>
  <td>A</td>
  <td>Banana</td>
  </tr>
  <tr>
  <td>C</td>
  <td>Apple</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The result should be like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>name</th>
  <th>food</th>
  <th>count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>apple</td>
  <td>(2)</td>
  </tr>
  <tr>
  <td>B</td>
  <td>Banana</td>
  <td>(1)</td>
  </tr>
  <tr>
  <td>A</td>
  <td>Bananaa</td>
  <td>(2)</td>
  </tr>
  <tr>
  <td>C</td>
  <td>Apple</td>
  <td>(1)</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need a third column in the result set in which the value will be <code>count(Name)</code></p>
  <p>Thanks in advance</p>