Your Serial.print(buttonCount) is outside the scope of the "if (upButtonState != lastButtonState)" so naturally it prints every time round the loop.
Steve
Your Serial.print(buttonCount) is outside the scope of the "if (upButtonState != lastButtonState)" so naturally it prints every time round the loop.
Steve