detachInterupt() from the inside of the interupt function?

What do you mean by returning from the ISR immediatly?

At the start of the ISR

if (weHaveDoneThisEnoughTimes)
{
  return;  //don't execute the code in the ISR
}