You are setting out chairs in a patio for a class. Six chairs are there, four have people in them, and someone asks if they can still sit down. Your answer will count the free chairs. Counting everything in sight gives the right number for a different question.
Count what remains
Start with how many chairs you had, then say how many are occupied. The last sentence below gives the number still available. Quedan agrees with dos sillas libres. If another person sits down, your reply becomes Queda una.
Había seis sillas. Cuatro están ocupadas. Quedan dos sillas libres.
Water or glasses?
Water is measured here as an amount. A question about whether any remains uses queda. Glasses can be counted. A question about several glasses takes quedan, but the answer changes to queda when only one is left.
—¿Queda agua? —Sí. / —¿Cuántos vasos quedan? —Solo queda uno.
Leave out the thing you just named
If the conversation is still about sillas, ask ¿Cuántas quedan? For vasos ask ¿Cuántos quedan? Both questions use a plural verb. The ending of cuántas or cuántos points back to the noun the other person already knows.
—¿Cuántas quedan? —Dos. / —¿Cuántos quedan? —Uno.
Time before the lesson
Your friend checks the clock while you set out the last chair. Un cuarto de hora is a single span of time, so say queda. With quince minutos, use quedan. Both answers can describe exactly the same amount of time.
—¿Cuánto tiempo queda para empezar? —Queda un cuarto de hora.
Solve three little shortages
Five notebooks are on the table and three are taken. Three chairs are empty and two are claimed. Ten minutes remain before class. Give one answer for each situation before comparing with the Spanish below. Notice the verb changes in the middle answer.
Quedan dos cuadernos. / Queda una silla libre. / Quedan diez minutos.
