What it really checks for is contains() and not the count of the number of occurrences, right? Duplicates are not permitted either so wouldn\'t contains() be a better name t
It's a standard operation on containers that returns the number of matching elements. In things like lists, this makes perfect sense. It just so happens that on a set, there can only be one occurrence of an element and therefore count can never return a value greater than 1.