Arduino Uno Rev 3 Auto Resetting, Maybe broken?

Hi Everyone, I'm here to ask help: I've made a little project which is simply a button that sets the state of an LED; The LED starts on , then if i press the button, the LED turns off, if i press it again it gets back on. The problem is: after a random ammount of time ( usually 5 to 15 seconds) EITHER if the LED is on or off, the LEDs (including the ones on the Arduino) Flashes 3 times and restarts the code. E.g. My LED is off, 5 seconds after, the LED blinks 3 times, shuts off, and gets back on, like if i pressed the reset button. The code works, now the question isIs it broken? If not, can someone tell me what has gome wrong?

(deleted)

For Schematics and code refer to the following link

Just modify the code so that this section

  if (buttonPushCounter % 4 == 0) {
    digitalWrite(ledPin, HIGH);
  } else {
   digitalWrite(ledPin, LOW);
  }

looks like this

  if (buttonPushCounter % 2 == 0) {
    digitalWrite(ledPin, HIGH);
  } else {
   digitalWrite(ledPin, LOW);
  }