Returns the frequency of characters in a string