@jsotola's comment (Something like: "Sounds like something machine learning could do") is probably the right answer, but I'll expand on it a little.
It's going to depend on at least the following factors:
- Size of the room
- Number of people
- Type of activity the people are doing
- Amount of ventilation the room has (windows/ac/...)
- Accuracy and response time of the sensor used
- Number and position of sensors
I have used data from a CO2 sensor to roughly estimate room occupancy in the past for a single room, I didn't end up going down the machine learning route at the time, rather using things like the rate of change CO2 to give an indicator (more people the quicker the value went up). But if I was doing it again I probably would start gathering data to use as training material.
It might also be worth fusing the data with another sensor, e.g. a relative humidity sensor as this is also likely to increase at the same time.