What is the initial value of a numeric variable?....When do they get reset? at login ? after shutdown? after restart? when the Keyboard Maestro starts?

What is the initial value of a numeric variable?
What is the initial value of a string variable?
When do they get reset? at login ? after shutdown? after restart? when the Keyboard Maestro starts?
Do you need to initialise them?
Can you tell if a macro is being executed for the first time?
Can tell if the user has just logged in after a restart or after the screensaver has kicked in?

There is no such thing as a "numeric variable". All variables are textual and start with no value (empty string). Any variable that looks like a number can be used in a numeric calculation. The empty string does not look like a number, so an undefined ("new") variable is not valid in a numeric calculation until it is given a value.

Variables never get reset. You can reset them yourself by setting their value to to empty string, or to "%Delete%".

No. You can track it with a variable.

The engine has a Login trigger which only fires if the Keyboard Maestro Engine is launched as a login item. It also has a Engine Launched trigger which fires if the engine launches for any reason.