Simple javascript counting game