Counting Character Occurrences in Words