Thanks again - and sorry, I should have read the whole thread, not only the quote…
To me, the crucial piece of information is this:
The key is that the callback happens before the page loads.
In other words, the counter will have the increased values for the whole re-run of the script if used with on_click
, and only after the button if we use a button with if
-block - good to know!