The orders you write code affects what the console displays. Place counter += 1 first, to display 6 to 10.
counter += 1
6
10
Make sure to pick counter += 1, followed by print(counter).
print(counter)