Keep the first occurrence of every unique line.
Count words, clean up text, sort lists, and change case.