when a target has been hit to the ground, it's not 'alive'.
name the targets sequentially, i.e. targ1, targ2, targ3 to targ30.
create this script, count_targs.sqs -
_targ = 1
_targtot = 0
#loop
_whichtarg = call format ["targ%1",_targ]
?not (alive _whichtarg):_targtot = _targtot + 1
_targ = _targ + 1
?not (_targ>30):goto "loop"
hint format ["Your score is\n%1 out of 30",_targtot]
exit
run the script when you want a total. untested, but it should work.