Amount is used in reference to mass nouns (i.e., uncountable nouns such as bravery, water, and charisma). Number is used in reference to count nouns (i.e., countable nouns such as dog, year, and eyeball).
For example, because the noun person can be counted, the phrase amount of people might be considered incorrect. The distinction tends to weaken, however, when we’re talking about great numbers. The amount of people in the room would sound wrong to many careful speakers of English, while the amount of people in China would not seem so glaringly wrong (though many English-speakers would still consider it questionable). In any case, it’s always safer to use number in situations like this.
Examples
Scientists have long noted that just about any event that shifts a large amount of mass from one part of the planet to another will have a tiny—and sometimes measurable—effect on the Earth’s rotation. [Wall Street Journal]
Worldwide, the number of shark attacks has grown each decade, hitting 646 in the 2000s. [Christian Science Monitor]
The number of students and graduates complaining about the handling of their loans has soared in recent years . . . [Independent]
Chretien stayed alive by eating nothing but a small amount of trail mix and melted snow. [CTV]