Start Counting...
WotC
1.) PHB
2.) DMG
3.) MM
4.) D&Dg
5.) MMII
6.) ELH
7.) PsiHandbook
8.) FRCS
FFG
9.) Spells & Spellcraft
10.) Traps & Treachery
11.) T&T II
12.) Path of the Sword
13.) Path of Magic
14.) Path of Faith
15.) Path of Shadows
16.) Mythic Races
17.) Seafarer's Handbook
SSS/Necromancer
18.) Tome of Horrors
19.) Relics & Rituals
20.) R&R 2
21.) Scarred Lands - Ghelspad
22.) Ravenloft Campaign Setting
Kenzer
23.) Villains' Handbook
24.) Kingdoms of Kalamar Campaign Setting
WotC (again)
25.) Book of Vile Darkness
Other
26.) The Canting Crew
27.) World Builder's Guidebook
28.) Encyclopedia of Demons and Devils
29.) EoDD II
30.) Dungeon World
31.) Swords of Power
32.) Rings of Power
33.) Wondrous Items of Power
34.) Monsternomicon
35.) Liber Bestarius
36.) Materia Magica
37.) The Book of the Righteous
SSS (again)
38.) Creature Collection
39.) Creature Collection II
Other (again)
40.) Necropolis (I think this is SSS, but not sure)
These are all the ones I could think of off the top of my head...
Not included as they are not quite "D&D":
Everquest
Spycraft
Dragonstar (both books)
Feel free to add to the list, folks.
--The Sigil