Counting group of equal quantity