Don't create an intermediate dictionary while computing character frequencies