title: Find duplicate lines in a file and count how many time each line was duplicated?
body: <p>Suppose I have a file similar to the following:</p>
  
  <pre><code>123 
  123 
  234 
  234 
  123 
  345
  </code></pre>
  
  <p>I would like to find how many times '123' was duplicated, how many times '234' was duplicated, etc.
  So ideally, the output would be like:</p>
  
  <pre><code>123  3 
  234  2 
  345  1
  </code></pre>