What is the maximum population that the Earth can support?

Taking all scientific and technological advancements into account.