Counter can count occurrences and help in removing duplicates by keeping only elements with a count of one.