I haven't understood yet when we have to use студентів instead of студенти. If someone could explain it to me please
Студентів is the Genitive form of студенти. Genitive is always used with the question word скільки.
Think of it as "How many of students are there?" :) A sort of literal translation of the Ukrainian grammar pattern, might help remember it.
Can там be at the end or beginning of the sentence as well?
Good question. I initially thought it would be "Скільки студентів там?" I was almost right