Remove unused counter variable