A "whole piece" of garlic is called a head of garlic .
Hence, How much garlic do you want?
How many heads of garlic do you want?
ell.stackexchange.com/users/2127/CowperKettle
“Garlic” is an uncountable noun.
So you should say "How much garlic do you want?", not "How many garlic(s) do you want?"
The whole garlic consisting of cloves is called a “head” or “bulb”.
So you can also say: How many heads/bulbs of garlic do you want?
How many cloves of garlic do you want?
ell.stackexchange.com/users/9259/Khan
Garlic is a bulb, and referred to as such.
When shopping you can ask for "three bulbs of garlic".
You can also say "garlic head" or "head of garlic".
For example, "Wrap each garlic head in foil and roast for 30 minutes".
ell.stackexchange.com/users/24231/James K
A garlic bulb (or head ) is made up of multiple cloves .
Most recipes call for one or more cloves of garlic, but you typically buy garlic by the head or bulb .
So - I may buy three heads of garlic, and use four cloves from one head in a recipe.
ell.stackexchange.com/users/45034/John Bode
Not all English speakers agree on whether "one piece of garlic" means a clove or a head.
That's the real problem here.
You can observe this cultural disagreement playing out in some of the other answers.
Your question: "How many pieces of garlic?" is technically a correctly-formed English sentence, but is ambiguous and open to misinterpretation.
It is best to always ask "How many cloves?" or "How many heads?" to avoid the ambiguity.
ell.stackexchange.com/users/69664/Jared Koester
...
but it's also okay to say How many pieces of gravel do you have now?
Yes and no.
You wouldn't say that to someone who just had a load of gravel delivered, you'd stick to "how much gravel" (and they'd probably reply with X number of tons or loads or bags or similar); "how many pieces" would be unanswerable.
But if you were asking about the number of pieces of gravel someone had in their hand, for instance, it would be fine.
Then, how about garlic, which is another uncountable noun?
I know I can say two cloves of garlic, but what should I say if it's a whole piece of garlic?
The "whole piece" of garlic is called a "head" or "bulb,"
so you'd use one of those terms instead of "piece," which could be ambiguous.
This will be situation-dependent.
If you're going the shopping and are asking how much garlic someone wants you to buy, you'd ask "how much" or "how many heads/bulbs" because you're not going to closely examine each head as you buy it to try to figure out how many cloves it has in it.
But if you're helping someone cook and they ask you to peel the garlic for the recipe, you'd probably ask "how much" or "how many cloves" they want you to peel (and even if you ask "how much," they'll likely answer in cloves).
ell.stackexchange.com/users/8743/T.J. Crowder
I learned that we should say   How much  gravel do you have now?   since "gravel" is an uncountable noun, but it's also okay to say   How many pieces of  gravel do you have now?   Then, how about garlic, which is another uncountable noun?I know I can say two  cloves  of garlic,but what should I say if it's a whole piece of garlic?   How much garlic do you want?  How many pieces of garlic do you want?   Are both okay?
How many pieces of garlic? How much garlic? uncountable noun
ell.stackexchange.com
<uncountable-nouns>
ell.stackexchange.com/questions/156381
ell.stackexchange.com/users/45418/dbwlsld
You should say "How much garlic do you want?". However, you might also refer to "cloves", "bulbs" or "heads" of garlic, in which case you can ask "How many cloves/bulbs/heads of garlic do you want?" How many pieces of garlic? is technically a correctly-formed English sentence, but is ambiguous and open to misinterpretation.
Garlic is an uncountable noun. So you should say "How much garlic do you want?", not "How many garlic(s)?" The whole garlic consisting of cloves is called a "head" or "bulb" Not all English speakers agree on whether "one piece of garlic" means a clove or a head. "How many pieces of garlic?" is technically a correctly-formed English sentence, but is ambiguous and open to misinterpretation.