Regarding counting the total of different keys
<p>I have a Map  which stores script No. and patient Id in map the script No. is key sine it is always unique ,as shown below </p>

<pre><code>Map m = new LinkedHashMap();
m.put ("123", "23"); 
m.put ("323", "23");
m.put ("153", "23");
m.put ("623", "23");
m.put ("125", "23");
m.put ("122", "24");
m.put ("167", "24");
m.put ("173", "24");
m.put ("113", "25");
</code></pre>

<p>Now my query is is that I need to find out the that how many scripts are there associated with patient Id 23 </p>

<p>as we can see above total 5 different scripts are there with patient Id 23 , so I need to calculate total different scripts 
and scripts No.  also associacated with patient Id 23 that is 123,323,153,623,125</p>

<p>I have shown the value as Example but in my situation dynamic values will populate in Map so please advise.</p>
