Simplified logic nesting and counting for pauses.