Without a Do
loop
Tally[First /@ data]
{{AA, 2}, {CC, 5}, {DD, 3}}
or for speed
Tally[data[[All, 1]]]
{{AA, 2}, {CC, 5}, {DD, 3}}
EDIT:
Testing for a bigger set of data:
data2 = Table[{RandomChoice[{AA, BB, CC, DD}], RandomInteger[10],RandomInteger[10]}, {10000000}];
We get:
First@Timing@Tally[data2[[All, 1]]]
2.683217
First@Timing@Tally[First@Transpose[data2]]
3.416422
First@Timing@Tally[First /@ data2]
5.304034
So mapping is the slowest as suggested by @Artes