Character frequency
Character frequency with rules