Human occupancy information is crucial for any modern Building Management System (BMS). Implementing pervasive sensing and leveraging Carbon Dioxide data from BMS sensor, we present Carbon Dioxide - Human Occupancy Counter (CD-HOC), a novel way to estimate the number of people within a closed space from a single carbon dioxide sensor. CD-HOC de-noises and pre-processes the carbon dioxide data. We utilise both seasonal-trend decomposition based on Loess and seasonal-trend decomposition with moving average to factorise carbon dioxide data. For each trend, seasonal and irregular component, we model different regression algorithms to predict each respective human occupancy component value. We propose a zero pattern adjustment model to increase the accuracy and finally, we use additive decomposition to reconstruct the prediction value. We run our model in two different locations that have different contexts. The first location is an academic staff room and the second is a cinema theatre. Our results show an average of 4.33% increment in accuracy for the small room with 94.68% indoor human occupancy counting and 8.46% increase for the cinema theatre in comparison to the accuracy of the baseline method, support vector regression.