Here's why:
* It modifies a noun: It describes a noun, such as "monster" or "hydra." For example, "The five-headed monster roared."
* It expresses a quality: It describes the number of heads something has, which is a quality of the noun it modifies.
While "five" is a number, it's combined with "headed" to create a single adjective that describes a noun.