How to limit the number of questions in a table?

I’ve been developing a game and the mechanics of it is Question and answer Every time the user answer a question it will go to the next question until it reach its maximum number of the table. I’ve put 10 questions in a table how do i limit this to 5 questions that will appear on my game? even though it contains 10? I don’t want to remove the 5 questions since my table is shuffled.

local questions = {}  

#questions <-- how do i limit this one?

My thoughts on this problem is what if you add a counter for each time they answer the question it goes up by 1 and once it reaches 5 you continue with the rest of the script? Or use a for i = 1,5 do loop

My thoughts on this problem is what if you add a counter for each time they answer the question it goes up by 1 and once it reaches 5 you continue with the rest of the script? Or use a for i = 1,5 do loop