Added a counter to exec handled by %n