Number of related variables in an array

So everything works right now, but I need that final section (will be turned into a function later) to display the number of A's, B's, C's, D's, and F's. It seems like it should be pretty simple, but nothing is working for me. Thanks!

Keep a set of counter variables to count the number of A's, B's, C's etc.
Initialise them to zero at the beginning of your program, increment the appropriate counter when a grade is assigned in your block of if..else if statements.