wave counter and retry