Use number for things you can count separately — a number of people, a number of errors. Use amount for things measured as a mass — an amount of water, an amount of work. The test is whether you could put a figure on the items: if you can count them, it is a number.
The core difference
The same count-versus-mass distinction that separates fewer from less.
- number — countable: a number of complaints, a large number of visitors.
- amount — mass or uncountable: a small amount of milk, the amount of effort.
Where it gets interesting
Money and time behave as masses even though they are countable: an amount of money, not a number of money. And a countable thing treated in bulk can take amount — "the amount of paperwork" is fine because you are measuring the pile, not counting sheets.
The related pair
Fewer goes with countables and less with masses, following exactly the same logic — fewer errors, less water. If you know which of those to use, you know which of these.
Frequently asked questions
Is "amount of people" wrong?
Yes — people are countable, so it should be a number of people.
What about money?
Money takes amount, even though it is countable, because it is treated as a mass: an amount of money.
How does this relate to fewer and less?
Exactly the same logic. Number and fewer go with countables; amount and less go with masses.