If you are using Google analytics you can use their API.
The Reporting API V4 is what you would need as it allows you to pull from the analytics on your site. The “Realtime API V3” is for real time data like live visitors and such. It’s in limited beta so you have to apply and get whitelisted to use it. However, I’d wager this is probably overkill for what you are trying to accomplish. (Or just more work than it’s probably worth)
The main issue here is that Webflow doesn’t allow us to access the database. So you basically two options
Option 1: Find a way to store the updated page count outside of Webflow
To start any third party solution can fill this role. The first solution I gave earlier, the Google Analytics API, would all be hosted by Google which is why the page count can be retained unlike the Codepen linked above.
Perhaps there’s some business offering this as a paid solution I’m not sure. I haven’t seen anything like that though.
Here’s some info about the Google Spreadsheets API: https://developers.google.com/sheets/api/
Option 2: Utilize the Webflow API
The webflow API allows us to create new collection items and update them as well. So theroetically it would be possible for you to have a field in your collection titled "Number of Visitors" or something to that effect. Then utilizing the API I suppose you could push an update to that collections "Number of Visitors" field whenever someone visits the page.
I haven’t really played with the Webflow API. So this is just me speculating based on my quick read through of their documentation.