According to
this list, which only counts the spells for the PHB & the Spell Compendium, there are
1,607 spells. From just those two books. Of course, those are the two books with the most spells, but still. Every splatbook added at least a dozen new spells, with rare exception, so that list could be much, much higher. For instance, the ELH added the non-epic spell
genesis to the SRD. And here are
11 more spells that ended up in the SRD, from god knows where (
Deities & Demigods? I dunno, whatever). So that at least 1,618 to look over. Good luck.