Cuánto and Cuánta are used with uncountable nouns. Uncountable nouns refer to items which cannot be counted like flour, water, milk, salt...
¿Cuánta sal tomas? Mucha sal /poca sal...
Cuántos and Cuántas are used with countable nouns. Countable nouns refer to items which can be counted like books, cars, bottles, friends...
¿Cuántos libros de matemáticas tienes? tengo cinco libros.
¿Cuántas primas tienes? tengo tres primas.
Hope this helps!