added function for counter
changed new_qty to 0 if triggered