If your counting is conditional, then as you know the built in aggregates don't work. you will need to use something else. Running Totals, might be a way, those are DBlank's specialty...I haven't used them. I use shared variables for all of my calculations. It would seem that they are running totals, but with more flexibility.
you will need several, depending on how many groups you have. And if your group total is conditional, you will probably need a subreport or some such to calculate the 'total' for the average.
Shared variables are really easy to use:
in a formula just 'declare' them, and they are available for the entire report. Like:
shared numbervar aVariableName
assignment uses the := operator, equality testing uses =
in order to access an existing shared variable you need to 'declare' it like above. See Crystal's help for the valid variable types, they are pretty easy to remember/use. In general a variable will have 3 formulas, 1 to reset, 1 to display and 1 to increment.
I know tha this is vague, but it should give an idea of how to proceed.