結果 : how to count duplicate characters in string javascript