Hello,
As you have discovered, the command interpreter in GoCD is not a shell and does not perform environment variable substitution.
You can work around this limitation by explicitly invoking a shell (e.g. bash -c "echo ${GO_STAGE_COUNTER}") but the preferred method is to save the commands you want GoCD to execute into a script that is stored in your version control system and have GoCD run that.
Hope this helps,
Jason