title: Counting duplicate values in Hashmap
body: <p>I have a hash map that looks like this:</p>
  
  <pre><code>HashMap&lt;String, ArrayList&lt;String&gt;&gt; varX = new HashMap&lt;String, ArrayList&lt;String&gt;&gt;();
  </code></pre>
  
  <p>And I can't for the life of me work out how to count the number of duplicate values. 
  For example, If <code>put("001", "DM");</code> into the hash map and <code>put("010", "DM");</code> as well, how can count if there are two values int the ArrayList section of the Hashmap. </p>
  
  <p>For example, the output would look something like this: </p>
  
  <p><code>DM:2</code> as I 'put' two DM values into the Hashmap.</p>