Maybe I am missing something, but I am unsure why no one has suggested simply using cli() and sei() to block interrupts whilst reading a totally ordinary int or long value, then unblocking.
#include <avr/interrupt.h>
volatile long rpmcount;
void rpm_fun()
{
rpmcount++;
}
void setup()
{
attachInterrupt(2, rpm_fun, RISING);
}
void loop()
{
long count;
cli();
count = rpmcount;
sei();
// what do I want to do with this count now?
}
cli and sei are documented here: http://www.nongnu.org/avr-libc/user-manual/interrupt_8h.html