How to write a input counter data into EEPROM and retrieve it.?

in for info, im doing the same for a mileage save feature for a gauge panel