"Much" here is an adverb functioning as an intensifier, meaning "considerably", "to a large degree or extent". You can pretty much replace it with "a lot" without changing the meaning of the sentence. "Considerably" and "significantly" are also good substitutes.
She is much older than him.
= She is a lot older than him.
= She is considerably older than him.
= She is older than him by a lot.
"Quantity" is a count noun here meaning "number".
People came in great quantities.
= People came in great numbers.
= A lot of people came.
"In quantity" can also be idiomatically used there, and there is no real semantic difference between "in great quantity" and "in great quantities".