If you just want to count how many people are in a room, that’s easy. There are many commercial systems that do this. The low-cost ones almost all have an infrared beam detection system across the doorway with two beams (So you can detect the direction the person is going). You can also make one of these yourself without too much difficulty. They aren’t perfect (for example, if someone is carrying a large package and goes through the entranceway they may be counted as two people), but they’re pretty good. Doesn’t really have anything to do with smartthings, but we do discuss This type of application here occasionally. See the following thread, which includes a link to a sample do it yourself project of this type.
There also more expensive systems based on cameras of different types.
If you want to track where specific people are, again there are many commercial systems that do this. In the last year or two ibeacons have become popular for some conferences and large events. But then each person has to wear a bracelet with an ibeacon on it. Check out radius networks for devices and projects of this type.
So the short answer is that there are many of these systems available, and also many discussions of do it yourself projects of this type, but they don’t really have very much to do with the smartthings platform, Which is more focused on home automation.
To find commercial systems, just Google “people counting systems.”