Read rpm's of a Motor by interrupts

Hi,
I have to read the rpm's of a motor that can run between 1000-2000 rpm, using, an inductive sensor. I'll use interrupts to read the rpm's of the motor with an Arduino Mega, but I don't know if will be able to detect all the interrupts (1000-2000 rpm = 1000 - 2000 interrupts /min = 17 -34 interrupts / second).
What do you think? If it's not going to work... Do you know any other way to sense the speed of the motor?
See the code:

unsigned int rpm;
 unsigned long previTemps = 0;        // Variable per compare time
 long interval = 60000;           // 60000=minute
 
 void setup()
 {
   Serial.begin(9600);
   attachInterrupt(0, rpm_cinta, RISING);
   rpm = 0;
 }
 void loop()
 {
    unsigned long actualTemps = millis();
    if(actualTemps - previTemps > interval) {
    cli(); // Stop interrupts
    previTemps = actualTemps;   
    Serial.println(rpm); // Send rpm's by serial
    rpm=0;      // Reset rpm
    sei();// Disable interrupts
  }
 }
 void rpm_cinta()
 {
  rpm++; //Add rpm
  }

Regards,
Anton

TLERDRDEN:
Hi,
I have to read the rpm's of a motor that can run between 1000-2000 rpm, using, an inductive sensor. I'll use interrupts to read the rpm's of the motor with an Arduino Mega, but I don't know if will be able to detect all the interrupts (1000-2000 rpm = 1000 - 2000 interrupts /min = 17 -34 interrupts / second).

Why use interrupts? Your pulses will be about 30 milliseconds or more apart. Look up the pulseIn construct.

Your simple interrupt code should work. I would never reset the RPM variable. Also revCounts would be a better name for it. Just compare the new value with a previous value as you would if you were using millis() for timing

noInterrupts(); // just while you read revCounts
latestRevCount = revCounts;
interrupts();

countsThisPeriod = latestRevCount - prevRevCount;
prevRevCount = latestRevCount;

And make revCounts volatile as in

volatile unsigned int revCounts;
unsigned int latestRevCount;
unsigned int prevRevCount;

...R