title: Finding and counting duplicate filenames
body: <p>Need to search through all sub folders of current folder recursively and list all files of certain type and number of duplicates</p>
  
  <p>e.g. if current folder is home and there are 2 sub folders dir1 and dir2
  Then i need it to search dir1 and dir2 and list file names and number of duplicates</p>
  
  <p>this is what i have so far:
  I am using </p>
  
  <pre><code>find -name "*.h" .
  </code></pre>
  
  <p>to get a list of all the files of certain type.
  I need to now count duplicates and create a new list like</p>
  
  <pre><code> file1.h 2
  
   file2.h 1
  </code></pre>
  
  <p>where file1 is file name and 2 is number of duplicates overall.</p>