count occurrences of all characters in string python