Numbers are classified as nouns in terms of parts of speech. They represent a quantity or a value, which is a key characteristic of nouns. For example, in the sentence ‘Three dogs are playing in the yard,’ the word ‘three’ specifies how many dogs there are, functioning just like any other noun.
Additionally, numbers can also function as adjectives when they describe nouns, as in ‘I have five apples.’ Here, ‘five’ modifies the noun ‘apples’ by providing specific information about the quantity.
To sum it up, numbers can serve primarily as nouns, but they can also act as adjectives depending on the context in which they are used.