You want to add something to your game to help inform the player of how they are doing and to motivate the player to replay your game.
A common mechanism to engage the player is to introduce a scoring system. Such a system informs the player of how they are doing in the game, provides feedback for their actions, and can create an opportunity for the player to replay your game in an attempt to exceed his past performance. At it's most basic a high score system records some number of points for certain actions, such as collecting a coin, and reports this record to the player.
Here are some common ways to improve the system:
In some games you break the gameplay into a set of distinct levels. In this case it makes sense to expand the high score pattern to apply to each level as well as the entire game. This provides feedback to the player which informs them about their performance. Without such a mechanism the player may play several or all of the levels without knowing that he is doing poorly, which can lead to bitter surprise at the end of the game.
This is most likely the default option for most games which adopt this pattern. In this case you maintain a list of top scores somewhere on the users machine and record the user's name and score whenever appropriate. This allows the user to check their past scores and work to surpass them. This works in the same way as the time trail pattern.
People tend to be competitive, gamers moreso, as such allowing people to compete for the top score is often a good idea. This approach extends the last one by moving the high score list onto a server.