This query counts the table items, then uses GROUP BY to split the total count into the distinct grade categories.
GROUP BY
grade
Make sure to type GROUP BY.