How to track number of correct answers

I begin with a learning phase. Then I switch to the experiment after the participant gets the equivalent of three blocks of learning error-free.
How do I code for this?

Okay, I think I have it. I have used a macro at the block level. At the event level I have used feedback to change the value of the code.
Thank-you for reading this.