  Detecting the presence and estimating the number of subjects in an indoor
environment has grown in importance recently. For example, the information if a
room is unoccupied can be used for automatically switching off the light, air
conditioning, and ventilation, thereby saving significant amounts of energy in
public buildings.
  Most existing solutions rely on dedicated hardware installations, which
involve presence sensors, video cameras, and carbon dioxide sensors.
Unfortunately, such approaches are costly, subject to privacy concerns, have
high computational requirements, and lack ubiquitousness.
  The work presented in this article addresses these limitations by proposing a
low-cost system for occupancy detection.
  Our approach builds upon detecting variations in Bluetooth Low Energy (BLE)
signals related to the presence of humans. The effectiveness of this approach
is evaluated by performing comprehensive tests on 5 different datasets.
  We apply different pattern recognition models and compare our methodology
with systems building upon IEEE 802.11 (WiFi).
  On average, in different environments, we can correctly classify the
occupancy with an accuracy of 97.97\%. When estimating the number of people in
a room, on average, the estimated number of subjects differs from the actual
one by 0.32 persons.
  We conclude that the performance of our system is comparable to existing ones
based on WiFi, while leading to a significantly reduced cost and installation
effort. Hence, our approach makes occupancy detection practical for real-world
deployments.
