This question already has an answer here:
- Adjective + “of them” 3 answers
In this sentence:
Five birds landed on the branch.
Is the word “five” an adjective? Why or why not?
In old grammars, cardinal numbers were treated as definite numeral adjectives. Such classification is still taught by some, but it's outdated, because as grammar evolves as a discipline, more and more word classes are being distinguished. One of the things apparent right away is that cardinal numbers are not gradable (five marbles, *fiver marbles) and cannot be modified by intensifiers (*very five marbles). That doesn't exclude them automatically from adjectives (those denoting maximums aren't gradable/modifiable by very either — *very enormous; notwithstanding, one can say, Oh, that is such an enormous tree, whereas the same is not possible with numbers: *Oh, those are such five trees), but it does hint that they are special.
One of the uses (and definitions) of five is as a determiner
A determiner can be an adjective. There is a discussion of determiners here.