Try:
if {table.field} = "DP" then 1
Right click on this formula and insert a summary (SUM, not count). Create separate formulas for "ST" and "pm", and insert sums on them at the group and grand total levels.
You could also use running totals (a separate one for each), specifying in the evaluate based on a formula area:
{table.field} = "DP"
Reset on change of group.
However, running totals generally are slower than using formulas, and you would have to create separate ones if you also want grand totals.
-LB