We present new approaches for determining occupancy in smart building management systems. The solutions can be applied dually, in civil and military areas, not only for economic management but also in crisis situations when it is necessary to ensure the safety or rescue of citizens. Examining the occupancy of university workplaces can lead to future improvements in safety and energy consumption. In addition to common PIR-based motion methods, our implementation uses communication between mobile devices and infrastructure in the form of probe requests from Wi-Fi packets. The data are captured using sniffers based on ESP32 microcontrollers, then processed using Python. Thanks to this, the total number of people (respectively mobile devices) in the building can be estimated. The achieved RMSE estimation error was evaluated for minimal, small, and medium-sized room scenarios, respectively. Aspects of the use of smart building technologies are also considered in detail from the military point of view.