How to score?

How do you make a score that shows points, like in typical platform games, everytime clicking on a object? Like this one: Keeping score

(If there is already a thread about this, please send the Url to me and remove this one.)