$semi_count += () = m{;(?!\s*End)}g; [download]
update: added the \s* (didn't see the space initially)
In reply to Re: Exempting through search by bikeNomad in thread Exempting through search by KStowe