Reset global (or) flow counter values when session is closed

i am looking for an approach where my counter values are reset when the session of my flow is closed (or) node red server is turned off.

in my current implementation i am using-


and then i increment the counter value based on a condition. When i relaunch the node-red server - i see that the last saved value of the counter is still saved.

Is there a way i can reset the value when the session is closed?

i also tried


same results

You can use a change node to set or delete a context variable. It could be triggered by an inject node set to fire at startup.

How many global context variables are you using?