[Solved] Issue creating a variable for page scroll

I created a prototype where I defined a variable to show the scroll position on a page. Suddenly, the value of that scroll position goes from 1 to 9 and after 9, it goes back to 1 again.

I have attached a simple file with the issue and also here is a screencast of the issue.

https://www.loom.com/share/ebc6901d287a4616bf5faf32b12d00f2?sid=61a09d7a-e351-48b1-b6e9-2ec1905d8bf1

test.pie