I can't find the specific reference, but that was the upper limit set just by thermodynamics; i.e., when the waste heat from human activities becomes large enough to heat the Earth too much. Insolation on Earth is about 100,000 terawatts, or 100 kW/person; a few kW per capita would be a few % of this, arguably close to that upper limit. That 1 trillion population would live in a very artificial environment, more like a space colony than a planet. All wastes would be recycled, including exhaled CO2, and food would be manufactured artificially rather than by agriculture (because photosynthesis is so inefficient.)
(I think it's referenced in J. E. Cohen's 1996 book "How Many People Can the Earth Support?" but I don't have a copy of that in front of me.)
This is not at all to say that this would be a desirable situation, or that human population is a metric that should be maximized at the expense of any other metric.