結果 : count occurrences of a character in a string javascript