it makes a list of all the unique words that have been used and counts how many times each word is used