hit counter code

based on video game