DBlank will do it differently than me, he tends to make a formula that will return a 1 or 0 and then sum it up, but I would use shared variables.
since this sounds like it will only be used once per report, only 2 formulas needed, and one already exists.
modify the existing formula that selects the ACT to display with
shared numbervar ACT;
for the else section that will display ACT:
else (
"ACT";
ACT:=ACT + 1;
)
now in the footer all you need a formula to display your variable:
shared numbervar ACT
HTH