We consider the problem of a magnetic impurity, described by the Anderson impurity model, in a low carrier density system. Such a system might be realized experimentally in strongly doped semiconductors containing magnetic impurities. We focus on the simple cases of a one-hole impurity (e.g., ${\mathrm{Cu}}^{2+}$) or a one-electron impurity (like ${\mathrm{Ce}}^{3+}$) hybridizing with a nearly filled or nearly empty band. We show that the physics of these systems is in various respects distinct from the Kondo effect of systems with partly filled valence bands. Although the local susceptibility is strongly enhanced by the interactions, we find at low doping (\ensuremath{\delta}) a mass reduction of the quasiparticles at the Fermi energy (${\mathit{E}}_{\mathit{F}}$), if a (singlet) bound state is stable at zero doping. We show analytically that this is caused by band-edge effects. We show further that vastly different behavior can be expected, depending on the filling of the impurity. For a one-electron impurity (Ce) interacting with an almost-filled valence band in the U=\ensuremath{\infty} limit, there is a one-particle-like bound state close to ${\mathit{E}}_{\mathit{F}}$. As the doping is increased this state turns into a traditional Kondo resonance. In the case of a nearly filled impurity, however, the gap state is a two-particle singlet bound state, causing a singularity in the vertex function of the diagrammatic approach to the Kondo problem. In this limit the so-called noncrossing approximation breaks down. At intermediate doping levels it is no longer possible to identify a small parameter and for small and intermediate dopings we argue that the system is not characterized by a single energy scale.