"A number of" means "many."
"The number of" is something more specific, i.e. "I know exactly the number of people who are living here." I know the number -- it is four (for example).
"The" is precise and referential. "A number of" is not precise, it just means several or many.