I am trying to understand the use of algo vs. algunos in the sentences below. At first I thought algo was a pronoun, and algunos was an adjective. But in the third sentence, Algunas appears to be a pronoun.
Él tiene algo de torta. He has some cake. Él tiene algunos libros. He has some apples
Algunas de las pelotas son amarillas. Some of the balls are yellow.
I reviewed some of the previous questions, but didn't see the answer to my question. Thank you.