How does a program record how many times something happens?
A program may need to count passes, incorrect answers, items sold or values that match a condition.
Counting uses a variable called a counter. Whenever the event happens, the counter increases by one.