How can i get one button to do multiple tasks depending on how many times it has been clicked? (Javascript)

For example button is clicked - alert "button clicked once" button gets clicked again - alert "button clicked twice" button is clicked again - alert" button has been clicked three times!"

Sorry if its a noob question, the reason is I AM A NOOB!!!