Counter · One-counter
A valid expression in reverse Polish notation
n pushes an operand; o, a binary operator, takes two and leaves one. The counter is the depth of the evaluation stack: an operator needs at least two, and a valid expression ends with exactly one. A calculator’s stack, reduced to its height.
The author’s examples, run
n → acceptnno → acceptnnono → acceptnnnoo → acceptnonn → rejectnn → rejecto → rejectnnooo → reject