fix error counting in tempest script