added min_trigger_length requirement in GetNumberOfTriggers funstion