Touch count of image and button

Each time an image OR button is clicked i want to count it .
Can somebody give me a lead how to accomplish this ?

Get a global variable, and increment it by 1 everytime you click the button.