A $2 \times 5$ contingency (multiway) table analysis, based on a chi-squared test. It's essentially a test of proportions of the frequencies (count data) to determine if anything "tracks" between the two factors, before/after and grade. Contingency table analysis can be complex, however, wherein different hypotheses can be employed surrounding questions about independence, correlation, trends, patterns.
Since you do have before and after data, where subjects are their own controls, there may be within-subject correlation issues that need to be taken into account. In other words, there can be some predictability between the before and after data, since the frequencies in the after data are not independent of the frequencies in the before data, because they are correlated.
If your before and after categories were drug vs. placebo, and different subjects were evaluated for grade in these two categories, then the frequencies would be independent. For $2 \times 2$ tables with before and after vs. e.g. disease/no disease, or low grade vs high grade, look at the McNemar test. Otherwise, the analysis may be attacked from a longitudinal data analysis perspective.