While commenting on: this answer I tried to give an exact number of all sorcerer-wizard spells in D&D 3.5.
Trivial searching didn't produce any results.
Therefore, how many spells are there, by level and class?
1017 spells, as of 2005. This significantly does not include spell compendium updates or the latter complete books.
Operating over this list of sor/wis spells, without filtering for sorcerer specific or wizard specific, for all books from 2005 indexed, we get:
This gets us a total cost to learn of (renting access) 50*spell level = 210625 + 4230 pages or 5 blessed books for 12500*5 for 273125 gp, A sizeable chunk of a level 20 wizard's cash and a seriously non-trivial amount versus the 340k gp a level 17 wizard starts with.
While Chet's indexes are clear and useful, they are unfortunately not very complete. Notably, since the spell list's last update was in 2005, it is missing such important works as the Spell Compendium and the latter part of the Complete series (Complete Champion, Complete Mage, Complete Scoundrel).
A large database I know of is IMarvinTPA's database. In addition to being searchable, it is available in CSV format.
Naively looking through the CSV sorted by Sor/Wiz levels, I get:
For 1483 spells, covering 6011 pages of a spellbook.
However, the accuracy of this obviously depends on IMarvinTPA's accuracy. While it does grab from a greater number of sources than Chet's index, it
Another (probably even more comprehensive) database is the one published by DnDtools.eu. It is an SQLite database that contains 1935 unique spell names associated with the classes "Wizard" or "Sorcerer".
Grouping by (minimum associated) spell levels, I get the following:
Go here for the SQL. I have not gone further into investigating the discrepancies between the two datasets.
From only the core spell lists for Wizards and Sorcerers in the SRD and some tedious counting...
Level 0: 19
For grand totals of 372 Wizard spells and 370 Sorcerer spells.
Filter by Sorcerer - 2542 Filter by Wizard - 2520
However, this does include multiple campaign settings, renamed spells and versions of the same spell from different WotC books.