> How will they limit temporal renting
Like any other illegal activity. My best guess is that the police will act when neighbors complain about noise or other nuisances. The fact that it is illegal will make easy to evict the occupants and fine the owner.
How will you separate it into two types?
If you don't work and you just visit for leisure, you're a tourist. If you're planning to rent an apartment for short-term remote work, you'll need to be a resident, and you'll have a short-term contract where at least your resident number is put as well (and don't forget to pay taxes on the income you earn while in the country too).
So I guess leisure vs work is the line you're looking for is.