Count a total number of duplicate elements in an array.
Pictorial representation:
File5.1.png

  
Your score is:       
Copy paste the above completed code in below IDE and run