Hi Disha,
Its slightly ambigous as to whether you are using an LED or an LDR for detection. I hope you mean an IR LED, the LDR might be too slow for this.
First off, check whether your opto arrangement is actually working by moving the fan blades manually, and look for pulses on the CPU input pin; if not, post your detector schematic.
The max rotational speed of the fan is bound to reduce when you mount your PCB on the blade. So, there is no escaping a tacho or a frequency counter.
This is not as difficult as it sounds. There are numerous frequency counter designs on the internet; build one. Or let your optical detecor itself do the work, once its running.
Regards.