if (digitalRead(buttonPin))
{
buttonPushCounter++; // add one to counter
}
if (buttonPushCounter == 1)
{
DoTheOneThing;
}
elif (buttonPushCounter == 2)
{
DoTheTwoThing;
}
if (buttonPushCounter >= 3)
{
buttonPushCounter =0;
}
Or somthing like that.