Creating a summary table at the end of a test

Good afternoon! I am wanting to insert a table on the last slide that tells me how many students in each class got a question right. I was thinking I could somehow sum together how many student answers matched the key, but I am not entirely sure how to go about doing that. Any help would be appreciated!

I don’t know if this is the best way but doesn’t something like this make sense to you?

If not let me know and we can brainstorm better/easier ways.

I may be interpreting this wrong, but this seems to be telling each individual student how many questions he or she got right. I am wanting a table that tells me how many students in the class got question #15 (for example) right. I have a table set up on the last slide… I am just not sure how to aggregate the data from all of my students.