Storing an index by a counter

hello, I will need help,
the goal of the program is to store a counter index to prevent each node red start or redeploy, indexe starts to zero.
I tried several solutions without success
image

the storage keeps the value of the idex in memory and changes it into a topic.
if the starting index is1 (initialization) then take the Topic.
But it does not work.
image
image

this is what happens after a redeployment

image

Might I suggest yu read the documentation about context - It may give you some ideas
https://nodered.org/docs/user-guide/context and this thread might help