This circuit that applies to both TTL and CMOS logic uses a J-K flip-flop, and the maximum frequency depends on the logic used. The circuit is from an old documentation, but totally valid nowadays.