"any comparison tests after this, will not be met"

Not quite sure what you mean by that.
I'm guessing yeah, if you need to still access either the timer or the flipped switch, you'll probably need to declare a whole 'nother variable. Hope that doesn't blow your memory budget.
Since I'm uncertain exactly what you want to do, here's the kitchen sink:

Code:
var alarm_timer = 0 ; 
var my_switch = 1 ; 
var my_counter = 0 ; 
var elapsed_time = 0 ; 

if ( my_switch == 1 ) elapsed_time = 0 ; 

while ( my_switch == 1  )
{
alarm_timer += time_step / 16 ;
elapsed_time = alarm_timer  ;  // copy time into display variable
if(alarm_timer >= 5) // after 5 seconds
{ 
beep();
alarm_timer = 0 ; // reset timer for next time
my_switch = 0 ; // turn off the alarm
my_counter++ ; // log how many times alarm has been triggered
}

wait(1);
}