Create a Histogram: Iterating Over the Hash

I have completed the exercise Iterating over the hash in the intro the Ruby course but I don’t understand how this exercise works.
When the hash is turned into an array with the .sort_by how exactly does it become a tuple? How does the value ‘count’ add numbers to each item in the array?