Both the questions how much and how many are used to ask the amount or the number of something. The difference comes from the noun that you are asking about.
Nouns can be separated into countable and uncountable nouns. This means that some nouns can be directly counted (you can say there is one cup, for example), but others cannot (you have to say one cup of water if you talk about water).
For this second type of nouns, the amount of what you are talking about needs to be quantified with another descriptor. For example, you can say a spoonful of, a cup of, a liter of, a pound of, a kilogram of, a square foot of, or something similar.
For countable nouns, you can directly use numbers to say what amount you have of them. (For example, books, houses, dollars, pounds, kilograms, degrees, etc. fall into this category.) If you want to know about the number you have, you need to ask how many.
- How many books do you have in your library?
- How many dollars will this cost?
- How many houses are on this street?
- How many subway stations are there between your office and your home?
For uncountable nouns, this is the opposite. You cannot directly say how much there is by using numbers. For example, nouns like hope, faith, water, sugar, money, happiness, worry, chocolate, etc. fall into this category. You would never say you have one hope; you need to say that you have a little bit of hope or a lot of hope to quantify it. For more concrete nouns like sugar, you could say you have a spoonful of sugar, a bag of sugar, a pound of sugar, etc. For these, you will need to ask how much.
- How much time will it take to finish the repairs on the house?
- How much money will you save by the end of the year?
- How much faith are you asking me to put in you?
- You want to buy how much chocolate?