There are good and bad bacteria that live in your mouth. Some types are for aiding in digestion. Most types of the other bacteria are harmless. A couple of types are very bad and cause tooth decay or even periodontitis. Some might hurt your health in other areas, such as your heart.
Researchers (very patient researchers) have painstakingly harvested all the plaque from every surface of every tooth. It weighs, on average, about 10 mg. But the teeth only comprise 1/20 of all the oral surfaces. You have to multiply the 10 mg from the teeth by 20 to get the total biomass including cheeks, tongue, etc.
We also know that 1 mg of oral biomass typically contains about 100 million microbes. By multiplying the number of microbes in 1 mg by 20, we get the total number of microbes in the entire oral cavity.
100 million microbes x 20 mg biomass = 20 billion oral microbes