Code:
ToggleLED1:
     if b=0 then cnt=cnt-1
     IF B=1 THEN CNT=CNT+1
 @ INT_RETURN
I found that strategy gave quite disappointing results , was jerky missed counts and had sudden and unexpected direction reversals. there are better ways