The number of times that I’ve seen these words confused is more than I can count—and that’s actually the point of the amount/number topic. Number refers to things that can be counted as individuals. Amount refers to a mass quantity, that is, things that cannot be counted as separate items. It’s similar to the fewer/less differentiation.
You can have a number of problems, a number of boyfriends, a number of business deals, a number of classes, a number of hobbies, a number of debts, and a number of 50-dollar bills. These are all things that can be counted individually: 3 boyfriends, 6 business deals, 4 classes, 8 debts, twelve 50-dollar bills, and a whole lot of problems.
You can have an amount of angst, an amount of debt, an amount of confusion, an amount of money, and an amount of compassion. These cannot be separated into individual items. For example, while you can have 3 debts to repay, each one a separate debt, debt (without the –s) cannot be separated; it is a mass concept.