The attempt to calculate the "capacity" of the planet has a history of over 300 years.
A very serious and very accurate analysis on the topic can be found in the book:
Joel E. Coen: How Many People Can the Earth Support?
Norton & Company 1996.