Fe2O3.xH2O
This is what you are talking about. So,rust is basically formed when iron oxides are exposed to moisture and air.
It forms a coat of a reddish- or yellowish-brown flaking coating of iron oxide that is formed on iron or steel by oxidation, especially in the presence of moisture.This is called rust.
Now,the answer to your question is that the number of water molecules are actually represented by an "x" because it is not of any certain value. It simply signifies a large number of water molecules that are attached to the compound Fe2O3 forming rust.
x means we don’t really know, because it varies from sample to sample
x means it is a non-zero positive number, but it could be an whole number or a fraction.
x means it doesn’t really matter much what the precise number is…