count(fieldname[fieldname = "A"])
To enter this formula double click the text box for the total, click the fx button by default value, click insert function, double click count, double click the insert field, choose your field from the repeating table, click filter data, add a filter to select the same field which equals the letter you want, click ok 4 times, make sure the "update this value when result changes" box is ticked, click ok. Repeat for each letter