Fill in countWords so that it returns a map from each distinct word to how many times it appears.
countWords
Hint: getOrDefault(word, 0) + 1 makes the first occurrence start at 1. The program looks values up by key — never rely on the order of a map.
getOrDefault(word, 0) + 1