js count specific characters in string