THE EXPENSIVE INFRARED DOUBLE BEAM OPTION
BTW, if you are serious about this and you are the home owner (not just renting) it can be done very nicely with a double set of trip beams at about shoulder height.
(Think of the alarm systems in movies like Mission Impossible. Or for that matter the “obstruction detected” sensor for a garage door.)
By having two sets a few inches apart, you can detect whether someone is entering the room or leaving based on which one tripped first.
However, people have to enter the room single file–if they break the beams at the same time, it will only count one person.
And if you are carrying something shiny, you can confuse the detectors.
Also, height can be tricky if you have large dogs and small children.
Anyway…this can be done at a cost of about $800 per door way, less if you do everything yourself and know exactly what you’re doing.
But it’s hardwired (not battery powered), and uses WiFi or direct line connection, not zigbee/zwave. And getting the information into SmartThings would be another story altogether.
But definitely doable with current technology. And less creepy than pointing cameras at everybody.
If I ever lose hand function all together, I will likely use something like this.