Enumeration method implementations for "mostfrequent" and "leastfrequent".