Use reverse sorting when counting occurrences