Specs are asking for counting items on each group, not cost.
Query still needs some work but you are in the right path - keep going.