Put this formula in cell AA3:

Formula: copy to clipboard
=COUNTIFS($C$2:$Z$2,AA$2,$C3:$Z3,"C")


then copy it into AB3:AC3, then copy AA3:AC3 down as far as you need to.

Hope this helps.

Pete