There are indeed a number of protons in neutron stars. However, to achieve charge neutrality, there must be an equal number of electrons. Energies for these occupied electron states increase much more rapidly than neutron states. Bearing in mind the exclusion principle, this means that (unlike everyday conditions) a proton and electron can be associated with a higher energy state than a neutron. Above a very small concentration of protons it becomes energetically favourable for electron capture to convert the protons to neutrons.
Edit: To obtain a rough estimate of the ratio of protons/electrons to neutrons, assume that the Fermi energy of the electrons and neutrons is equal (the protons themselves will make a negligible contribution). The Fermi energy for a mass $m$ species can be estimated as:
$$ E_F = \frac{\hbar}{2 m} \left ( \frac{3 \pi^2 N}{V} \right )^{2/3} . $$
As the electron is about $1840$ times as massive as the electron, there will be about $1840^{3/2} \approx 78800$ times as many neutrons as protons/electrons.
The above assumes that Fermi energy is much larger than the mass-energy difference between the neutron and a proton-electron pair. It is also assumed that this energy is much lower than mass-energy difference compared with exotic baryon-lepton pairs. This is not necessarily true of neutron star cores, where strange matter is predicted. Finally, it is assumed that the particles are non-interacting.