Two queues, two checks
Seating gap = max(waiting customers − open usable seats, 0)
Cooking gap = max(waiting orders − idle usable stoves, 0)
Seating gap is the number of waiting customers left after the open usable seats are filled. Cooking gap is the number of waiting orders left after the idle usable stoves are assigned. A larger raw count does not establish which purchase would earn more or save more time.