Three researchers at the Weizmann Institute of Science in Israel traced that number back to a rough estimate made in 1972 that had never been seriously updated. They recalculated the actual cell counts using modern data on human tissue volume and bacterial density in the gut.
Their recalculation put the human body at about 30 trillion human cells and 38 trillion bacterial cells, a ratio close to one to one rather than ten to one. Red blood cells alone, which have no nucleus, accounted for about 84 percent of all human cells.
The new figures did not change what bacteria do inside the body, but they corrected a number that had been cited in textbooks, review articles, and popular science writing for more than forty years without anyone tracing it back to its source. The authors noted that even their own revised estimate carries real uncertainty, since bacterial counts vary by person, diet, and health.

Read the original study
Sender, Fuchs and Milo, PLoS Biology, 2016 · doi.org/10.1371/journal.pbio.1002533
A forty-year-old guess, finally checked.
Source
- Sender, R., Fuchs, S., & Milo, R. (2016). Revised Estimates for the Number of Human and Bacteria Cells in the Body. PLOS Biology, 14(8), e1002533. https://doi.org/10.1371/journal.pbio.1002533