Read from a text file, and list the distinct words with the number of occurrences of each word.