=COUNTIFS(G:G,"A") would give you the number of times 'A' is listed in column G.
Within a specific sub group in that column would require an extra criteria. You haven't stated what determines the subgroups though.
So if we assume your groups are determing by column F and there are three groups listed in this column (grp1,grp2,grp3) then you can count the number of A's in grp1 by altering the formula to:
=COUNTIFS(G:G,"A",F:F,"grp1")
If this doesn't make sense or provide the solution you are after please provide a small sample file with non sensitive data so that we can better understand your requirements.
Bookmarks