I know that it's only 6.1 megapixel which is one drawback
6.1 mp is not that much of a drawback. Megapixels increase exponentially, not additionally. To get something twice is large as 6mp, you have to leap all the way to 25mp. Anything in between is not as important as you might think.
...it has something funky with it's auto focusing system...
There's nothing "funky" about it. Nikon has two AF systems:
1) AF motor built into the body (noted as AF or AF-D), which drives the focusing mechanism in a lens via a screwdriver-like coupling on the mount.
2) AF motor built into the lens (noted as AF-S or AF-I), which is driven via CPU contacts on the mount.
The D40 will only AF with lenses in the #2 category because it lacks the built-in AF motor to save cost and weight. AF-S lenses are usually better and faster-focusing anyway. With the exception of the D60, all other Nikon DSLRs will AF using either system.
For mounting compatibility, however, it is the most compatible digital camera that Nikon makes: it will accept any lens Nikon has made since 1959 (with manual metering and focus, of course)
The D40 is only $409 US on Amazon right now (holy crap!). If you jump on it now, then, no, there is no better deal and no more expandable and vast an SLR system to buy into for that price.