How to Save Value from Counter to EEPROM in Arduino Uno [solved]

Keep in mind that EEPROM has a finite number of write cycles.
One method to avoid using them up too quickly - is to look at the power supply, and if it is going down, save the value to EEPROM... otherwise keep your live counter in RAM, and reload it from the saved value next run - during setup()