If you have to detail the count by grade, and if a student has both grades A and B but should count as 1, he would have to count as 1 in A and 0 in B for example, and this doesn't make sense.
I think that your requirement is inconsistent with your chart configuration. Or I didn't understand you...