Energy provision for buildings accounts for 40% of the total energy consumption in the EU, according to the European Union 2020 Energy Policy Review. Therefore, indoor occupancy estimation has attracted much attention in recent years as an important component of indoor energy management systems. However, existing methods commonly suffer from some limitations. For example, methods use conventional cameras which is generally not privacy-preserving or multiple environmental sensors which increases cost and maintenance efforts. On the other hand, multiple object detection (MOD) and multiple object tracking (MOT) have been extensively studied in recent years as important topics in the computer vision field. In this paper, we present TheDet, a privacy-preserving method that uses a lowresolution thermal camera together with MOD and MOT techniques to perform occupancy estimation.