Feedback on number of correct responses

Hi,

I’m trying to code for the first time. I have built a serial reaction time experiment where participants are expected to respond to the locations with corresponding keys. In my experiment, I want to give the feedback on “number of correct responses at the end of the routine”. How to write a code for this?

I request for step wise/descriptive instructions as I’m new-bee to code.

Thanks in advance!