Grammar books remind us that in English a word is classified according to its USE. " So most books would classify "rock" in your sentence as an adjective. " If this were a test, you could say this sentence has two nouns ("collection" and "doll"), or you could say it has four nouns with two of them ("rock" and "Barbie") being used as adjectives.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Anonymousyou could say it has four nouns with two of them ("rock" and "Barbie") being used as adjectives.I've read somewhere that this kind of words is called noun modifier.