If a game has hard-coded limit for threads, it won't run on CPUs with less. A hard-coded limit for frequency would work exactly the same way. If it's 3.4 GHz, game won't run on 3GHz - no matter if it's 4, 8 or 20 cores.
Not that I think this will be true here, but I recall a game that didn't want to install on my notebook and the error message precisely said that I have less than some desired frequency. So it surely happened before.
Just simply detecting number of threads is not enough, there are ways of detecting physical cores vs. threads, but you still may have to know if it's SMT, pairs of crippled cores (like Bulldozer), or simply different cores (like ARM designs have already).
Frequency is much more complicated. I've mostly done this in Linux, but even in Windows I believe the only thing you easily can obtain is the base clock, maybe even the current clock speed, but that will be fluctuating. I don't know how you would find max boost, or even more so max boost at e.g. 4 cores, across any current and future CPU architecture. Still there is a huge difference in IPC, e.g. a Bulldozer vs. Skylake. If a game impose such hard limits, those would have to be set very low, too low to make any sense anyway. Laptops usually have very low base clocks these days, it would be nearly impossible to determine this correctly without a benchmark. And even among desktop CPUs, the monster i9-7980XE have 2.6 GHz base (3.4-4.2 GHz boost) would seem weaker than my old i7-3930K 3.2 GHz (3.5-3.8 GHz boost).
If you release a game today, you might want to make it run on future hardware as well. Adding hard limits for thread count or CPU frequency will be very risky, and if current trends continue, it will just get harder and harder to assess the actual performance from theoretical figures. I wouldn't even dare to put such hard limits in a game, but I would consider making a mini-benchmark during startup and have a popup in the corner of the menu saying your hardware might be limiting the gaming experience.