Where does the "quint" in "quintessential" come from?

Doesn't "quint" mean "five"? What does that have to do with the meaning of "quintessential"?

english.stackexchange.com