title: Formula to find duplicates and print the number of mentions
body: <p>I'm looking to create a formula determine duplicate values in a spreadsheet and count the number of mentions of each, then to sort into two cells.</p>
  <p>Hoping it goes from something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Animal Type</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">Cat</td>
  </tr>
  <tr>
  <td style="text-align: left;">Dog</td>
  </tr>
  <tr>
  <td style="text-align: left;">Parrot</td>
  </tr>
  <tr>
  <td style="text-align: left;">Cat</td>
  </tr>
  <tr>
  <td style="text-align: left;">Cat</td>
  </tr>
  <tr>
  <td style="text-align: left;">Dog</td>
  </tr>
  <tr>
  <td style="text-align: left;">Elephant</td>
  </tr>
  <tr>
  <td style="text-align: left;">Elephant</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>To something like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">No. Animals</th>
  <th style="text-align: center;">Animal Type</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">Cat</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">Dog</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">Parrot</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">Elephant</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>How would I go about that?</p>