Maybe I did not clarify my thoughts enough.
Is this statement (and the example afterwards) correct?
"Useful resolving power (roughly) depends on 1) Lens used, and 2) Number of Pixels."
So if the 400mm (w/ 10mp sensor) gives, say, resolving power of 1m for an object 1km away, then a 400mm w/ 20mp sensor should give 0.5m resolving power for the same object.
A lens can "limit" your resolving power and a low resolution sensor can "limit" your resolving power if they are not sufficient. But my point (and links) above were to explain that there are limits within the laws of physics. Improving quality of the lens and improving the resolution on the sensor only improves image quality "to a point".
A 10 megapixel APS-C camera is not diffraction limited at f/11, but it _is_ diffraction limited at f/16 (which means it's hit the barrier at which more pixels will NOT improve resolving power.)
A 20 megapixel APS-C camera _is_ diffraction limited at f/11 (but is not diffraction limited at f/8).
If you use a full-frame sensor camera, the "pixels" become larger so you reduce the bottleneck on diffraction limits. But only a bit.
A 20 megapixel full-frame camera is not diffraction limited at f/11, but _is_ diffraction limited at f/16.
A 36 megapixel full-frame camera (e.g. Nikon D800) is diffraction limited at f/11, but is not diffraction limited at f/8.
To take a thought experiment.... suppose your camera had just 6 pixels arranged in a 2 pixel by 3 pixel matrix. You'd have really awful "resolving" power. Clearly adding more pixels WILL help. When I have hundreds of pixels I'll get a better image. Thousands of pixels would be better still. And millions of pixels would be even better. So you see this trend that "more pixels is better" and think you can keep getting better by continuing to increase the number of pixels. But once once the size of the pixels gets so tiny that the size of the "Airy disk" can no longer fit within just one pixel then increasing the sensor resolution will no longer be helpful... you've hit a barrier.
We may think of light as traveling in a straight line, but at a quantum level light has a "wave" nature and this modifies how it behaves. When you get down to pixels sizes that are just a few microns across you hit barriers in which light can no longer be focused finely enough. NOW if you want to increase resolution you have to make the sensor physically larger. And then that hits a point and you have to make the glass lenses physically larger. And then even that eventually hits a point (actually it become ludicrously expensive to make glass large enough with high enough quality to be useful. (which is why large telescopes uses mirrors instead of lenses to focus light.)
You can read about diffraction limits here:
Diffraction Limited Photography: Pixel Size, Aperture and Airy Disks