> 
> **Possible Duplicate:**  
> 
> [How to count Matching values in Array of Javascript](https://stackoverflow.com/questions/2228362/how-to-count-matching-values-in-array-of-javascript) 
> 
> 
> 

I have array with elements as,

array\_elements = ["2","1","2","2","3","4","3","3","3","5"];

i want to count array elements like following manner,

Answer:

2 comes --> 3 times  

**Note : Each value count should print only once.**