compare with correct counter for interrupt