Question: How many times has spain been a republic?
Answer: two
two very short periods
2
Natural Questions answer: two (from the Wikipedia article "Republicanism in Spain")