Hi Tom,
$count shows how many times you've iterated through a repeat loop. It starts out at one and increases by one each time you start processing a new item. What you want is the $NumberOf keyword. This can be combined with a where clause, for example, $numberOfUseCases where Priority = 1. In your example, you'll want $numberOfCurrentGroup to show the number of items in the group currently being processed. Let me know if you have any problems or questions.
Doug