The main difference between the two is cannon actually got its math right. With the difference between a film and a digital camera and the lenses, while nikon didn't. Both are excellent cameras. But I'd do a d40.
Personally, I think the glass is the most important factor and not the MP count.
I have a canon dslr and love it. If you go the dslr route. You can't go wrong with either the canon or nikons. Both companies know what they are doing.
You can't go wrong with either Canon or Nikon. I personally liked Nikon (have a D70s, D200 and awaiting my D300) and over the years have gotten quite a collection of lenses.