There are a few limiting factors when it comes to the lenses involved, but there is an absolute limit on resolution for a single aperture.
It's called the Rayleigh Criterion: basically, due to the diffraction of light as it passes through the opening of a camera or telescope, you cannot resolve two objects (that is, you can't tell there are two and not one single object) if the ratio of their separation over the distance to the objects is less than the ratio of the wavelength of light over the size of the opening.
That ratio s/d (object separation over distance to the object) also equals the sine of their angular separation, so the Rayleigh criterion is usually written as
sin theta = 1.22 x lambda/ D
The 1.22 is a factor thrown in for circular openings.
So a good SLR type camera, with about a 2 cm aperture with f-stop open wide, cannot possibly resolve two dots half a mile away unless they are more than 2 cm apart, and that's with a perfect lens.