Use How many for things you can count one by one: apples, books, people.
How many: things you can count
How many apples do you want?
How many books do you have?
How many people are coming?
Not "How much apples do you want?" — say "How many apples do you want?". You can count apples (one, two, three), so it takes How many.
Try it: ___ students are in the class? (How many / How much) Answer: How many — You can count students (one, two, three), so it takes How many. Save How much for things you can't count.
How much: things you can't count
Use How much for things you can't count one by one: water, time, rice.
How much water do you drink?
How much time do we have?
How much rice should I cook?
Not "How many water do you drink?" — say "How much water do you drink?". You can't count water one by one, so it takes How much.
Try it: ___ water do you drink each day? (How much / How many) Answer: How much — You can't count water one by one, so it takes How much. How many is for things you can count, like glasses of water.
The tricky ones
A few words feel countable but aren't, so they take How much: money, time, homework, advice. You will get a feel for these with practice.
How much money do you need?
How much homework do you have?
How much time do we have?
Try it: ___ money do you have with you? (How much / How many) Answer: How much — Money feels countable, but in English you can't count it one by one, so it takes How much. (These tricky ones come with practice.)
Try it: Can you count it? ___ chairs do we need for the party? (How many / How much) Answer: How many — You can count chairs (one, two, three), so it takes How many. (Can count it → many; can't count it → much.)