Global.get('')||0 inconsistent resutls (Function node)

Maybe you need to use persistent context?

https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115