how to extract 45 cycles from bunch of waveforms
For best performance in the presence of noise, I recommend "locking" onto the cyclical signal using a Phase-Lock-Loop (PLL) approach. Then you can feed the PLL output (which will be a cleaner representation of your signal and can be a digital square wave if desired) into a digital counter, which you can then count to 45 after resetting the counter at any position desired.