adding build and clean scripts
minor changes to add counters to an array to keep track of them