How to increase variables in scripts?

Please don’t post pictures of text. Post the properly formatted text.

Also variables are local to a script/automation. So the variable can’t be used outside the script.

Also you have variables declared twice.