So it turns out that one could just make it one big cavity. In this case, the closer I am to the famous 9 GHz transition which now is the official definition of the Second, the closer I get the more atoms get kicked into the higher energy state, and I count them in the end and adjust the frequency to maximize that.
Now, Ramsey had they genius idea to let nature do some more work in between. You see, in quantum mechanics, the phase of any quantum wave rotates with a frequency that is given by the energy, and the two cesium states have slightly different energy.
So what happens is the following: In the first cavity we apply the microwaves just strongly enough to turn the cesium into a quantum superposition of excited and unexcited state, then let them rotate according to their own frequency for a bit, letting them collect a bigger phase difference, and then finish the rotation into the wanted excited state.
The longer you make the flight time in-between, the more sensitive the final state will become to slight de-tunings of your frequency: the addiitonal phase that is collected during flight enhances the cancellation effects you get when the frequency is detuned.
This looks like this when you plot the probability over the microwave frequency (in arbitrary units): 2/3