The handler closes over one render’s count. Those calls queue the same replacement value, and React batches the event updates. Passing prev => prev + 1 queues updaters that each receive the preceding pending value, so three such updates add three.
Follow-up Interview Question · What happens if the final queued update is a fixed replacement?