1.5.2 Character Counting (slightly abridged)