add counter var to build.sh