Sure! Here's a simple game that meets your requirements:
Fruit Count: 0
Copy and save this code into a single HTML file, and open it in a web browser. You can play the game on a smartphone by using touch instead of mouse events.
In the game, you control the green player block using your finger/mouse. The goal is to collect oranges (fruits) by touching them. Each time you collect a fruit, your fruit count will increase by one, and a new fruit will respawn in a random location. However, if you touch the red enemy block, the game will be over and you'll have to start again.
The current fruit count is displayed at the top, and it updates dynamically as you collect fruits.
I hope you enjoy playing the game!