You can withdraw as many times as you like/need during the year. Just have/save the documentation of where the money goes.
If you pay for a semester in the next tax year during the current tax year, when the school sends you the 1098-T there will be an indication that some portion of it was for a future calendar/tax year. See page 2 box 7 on the sample 1098-T here: https://www.irs.gov/pub/irs-pdf/f1098t.pdf