If I buy 4 houses from the money received from selling 1 land, do I need to pay taxes?

I see that if you reinvest the amount within 2 years of selling something, the amount is exempted from tax. But is the necessary to only buy 1 property or can you buy more than 1?