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.