I'd say you present 2 switches, one triggers when someone enters the room, the other when someone exits, but without something else like a pir sensor that actually checks if someone is in the room or not, it will eventually leads to errors in the counter. All the counting will have to be made in the controller and maybe reset people count in a room if no movement is detected for like 30 minutes. How to do it in domoticz, I don't know 😁