This paper describes a large-scale wireless and wired environmental sensor network test-bed and its application to occupancy detection in an open-plan office building. Detection of occupant presence has been used extensively in built environments for applications such as demand-controlled ventilation and security; however, the ability to discern the actual number of people in a room is beyond the scope of current sensing techniques. To address this problem, a complex sensor network is deployed in the Robert L. Preger Intelligent Workplace comprising a wireless ambient-sensing system, a wired carbon dioxide sensing system, and a wired indoor air quality sensing system. A wired camera network is implemented as well for establishing true occupancy levels to be used as ground truth information for deriving algorithmic relationships with the environment conditions. To our knowledge, this extensive and diverse ambient-sensing infrastructure of the ITEST setup as well as the continuous data-collection capability is unprecedented. Final results indicate that there are significant correlations between measured environmental conditions and occupancy status. An average of 73% accuracy on the occupancy number detection was achieved by Hidden Markov Models during testing periods. This paper serves as an exploration to the research of ITEST for occupancy detection in offices. In addition, its utility extends to a wide variety of other building technology research areas such as human-centered environmental control, security, energy efficient and sustainable green buildings.