The system now counts and sorts the top colors correctly