updated tomcat script
changes to tomcat script to have a counter