Most known extrasolar planets (exoplanets) have been discovered using the radial velocity$^{bf 1,2}$ or transit$^{bf 3}$ 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$^{bf 6rm{bf -}bf 9}$, 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$^{bf 10}$. These planets are at least as numerous as the stars in the Milky Way$^{bf 10}$. 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$_{bf -9}^{bf +6}$% of stars host Jupiter-mass planets (0.3--10 $MJ$, where $MJ {bf = 318}$ $Mearth$ and $Mearth$ is Earths mass). Cool Neptunes (10--30 $Mearth$) and super-Earths (5--10 $Mearth$) are even more common: their respective abundances per star are 52$_{bf -29}^{bf +22}$% and 62$_{bf -37}^{bf +35}$%. We conclude that stars are orbited by planets as a rule, rather than the exception.