The name of the function is histogram, which is a statistical term for a set of
counters (or frequencies).
The first line of the function creates an empty dictionary. The for loop traverses
the string. Each time through the loop, if the character c is not in the dictionary,
we create a new item with key c and the initial value 1 (since we have seen this
letter once). If c is already in the dictionary we increment d[c].