Atmega328p (For the love of satan, someone got a clue?)

There are evidently two different pins involved in this code:

lombriz:

    attachInterrupt(0, FanSpeed_RPM, RISING);

This code causes FanSpeed_RPM() to be called whenever pin 2 (interrupt 0) goes from LOW to HIGH. For more information, see:

Note that it's recommended to use digitalPinToInterrupt() rather than just specifying the interrupt number directly in attachInterrupt(). That, in addition to not using a magic number for the interrupt pin likely would have prevented all your confusion.