Added counter to 'test' program