Add a resourse for threads, and make it FixedInteger, Then restart record, And click on " Thread Number " on the left upper corner, Then add your threads resourse inside it.
Create a variable called "counter". Than use "is element exist" to check if element exist and update "counter" variable whenever element is missing. Check counter variable in the loop, and fail thread if "counter" hit 3