A lock around count = count + 1: a second thread waits in line, and no interleaving loses an update.
This interactive visualization needs JavaScript.