Modify demo script - count iterations