The phrase the number of requires a singular verb. The phrase a number of requires a plural verb.
Consider the following sentences, both of which are grammatically correct:
The number of frogs in the pond is twice the number of fish.
A number of protestors are gathering outside the capitol building today.
The number refers to a specific but unspecified number, and takes a singular verb. A number of is an idiom that simply means “several” and takes a plural verb.
When you see either phrase – “the number of” or “a number of” – disregard the number of the noun following it because that noun will always be plural. To ensure that you don’t mistake the noun inside the prepositional phrase for the subject, always cross out prepositional phrases: