They did this enough times to have an accurate estimate of the lag time. They then counted how many cards came out before one of these cards reappeared. They waited until they saw 4 of the same card on the table so they knew they were all out (4 Qs, 4 2d, etc.).
The original guys that beat the game for a lot of money when these machines just came out were playing 4 deck machines.