My D100 (also 6MP, same sensor as your D40 I think) fits about 275-300 pictures on a 1 gig card. (that's JPEG fine) RAW is about 95-110. The amount you get in the end depends on what you are taking pictures of, yadda yadda... (less data in image, less data on card)