The basic rule is that masculine singular nouns end with -o, and feminine singular nouns end with -a. Generally words follow this form, but there are exceptions, of course.
Click to learn more: (link below)
I'm confused as carne is masculine i.e. il carne so shouldn't it be Quanto carne? not Quanta as that is for the feminine?
well... I guess it kinda makes sense than it to be "How much meat?", but I would probably answer this question by saying "3, please", referring to 3 steaks or 3 slices from the barbecue. My brain works with countable meat. I could say to a butcher "could you give me 2 fillet mignon?". A restaurant could say "all you can eat buffet with maximum of 2 meats for €10"
Pane is actually masculine that's why we use quanto while carne is feminine. Not all nouns follow the rule that masculine nouns end in "o" for singular masculine nouns and "i" for masculine plural while feminine nouns end in "a" for singular feminine nouns and "e" for plural feminine nouns. There are exceptions to these rules in regards to nouns ending in "e" and I guess we just have to know which one is feminine and which one is masculine.