Most known extrasolar planets (exoplanets) have been discovered using the radial velocity or transit methods. Both are biased towards planets that are relatively close to their parent stars, and studies find that around 17-30% (refs 4, 5) of solar-like stars host a planet. Gravitational microlensing, on the other hand, probes planets that are further away from their stars. Recently, a population of planets that are unbound or very far from their stars was discovered by microlensing. These planets are at least as numerous as the stars in the Milky Way. Here we report a statistical analysis of microlensing data (gathered in 2002-07) that reveals the fraction of bound planets 0.5-10 AU (Sun-Earth distance) from their stars. We find that 17(+6)(-9)% of stars host Jupiter-mass planets (0.3-10 M(J), where M(J) = 318 M(⊕) and M(⊕) is Earth's mass). Cool Neptunes (10-30 M(⊕)) and super-Earths (5-10 M(⊕)) are even more common: their respective abundances per star are 52(+22)(-29)% and 62(+35)(-37)%. We conclude that stars are orbited by planets as a rule, rather than the exception.