You don't really need to group the report to find the count. Try this:
1) Create a formula (@Count_Field A) with this code:
IF Instr({Field A}, "the_certain_string") > 0 then 1
2) Another formula (@Count_Field B_Set1) with this code:
IF Instr({Field B}, "the_certain_string") > 0 then 1
2) Another formula (@Count_Field B_Set2) with this code:
IF Instr({Field B}, "the_certain_string") > 0 then 1
Then, go to Insert > Summary > Choose the 1st formula and place it on the Report Footer. This is the Count of Field A.
Do the same for the other formulas too.
-Abhilash