Fix a typo in the Javascript for counting problem.

Fixes the issue we spotted on the phone.