JavaScript not counting correctly - Kevin Powell - Community