I also have another question: Is it correct to use eeprom.write() to store a number permanently, when the arduino has no power?
Yes, that is what EEPROM is for.
I also have another question: Is it correct to use eeprom.write() to store a number permanently, when the arduino has no power?
Yes, that is what EEPROM is for.