r count specific characters in string