Finding how much words can fit on 1 textbox

So, I have a random word generator and I have 2 textboxes which I want to fit with words. However, I need a way to calculate how many words will be able to fit on one textbox regarding the size of each word. Is this even possible?

it shows how to get every words, then u can do something like that:


local count = 0

for i = 1, #WORDS_HERE do
    count = count+1
    wait()
end