What is my increment code missing?

buttonNumber is a really lousy name for a variable that purports to hold the number of times a switch has been pressed.

You REALLY need to look at the state change detection example. Incrementing the stupidly-named variable when the switch pin IS high is NOT what you seem to want to do.