Fill in countUnique so that it returns the number of distinct words. Add them all to a set and read its size — the duplicates collapse by themselves.
countUnique
The program prints 3 and then 0.
3
0