We set a new upper limit on the abundance of primordial black holes (PBH) based on existing X-ray data. PBH interactions with interstellar medium should result in significant fluxes of X-ray photons, which would contribute to the observed number density of compact X-ray objects in galaxies. The data constrain PBH number density in the mass range from a few $M_odot$ to $2times 10^7 M_odot$. PBH density needed to account for the origin of black holes detected by LIGO is marginally allowed.