Count the Number of Duplicate Characters

Take a String that returns the amount of duplicate characters in a string. It will be case sensitive and spaces are included. If there are no duplicates, return 0.

Notes
Make sure to only start counting the second time a character appears.
Hello World!
Total : 0 Discussion
Login