Else if

I know this is basic - im new here though

I am trying to write a code that says if button pressed once x happens if pressed twice y happens

i am just not sure how to say pressed twice

thanks

amanda