The vehicle has tow capability, so why would it void the warranty?
Nobody here can honestly answer "how many miles"... it all depends what you are towing.
Roughly, the range of the Model X will be impacted as much as the gas mileage on a petrol truck. So, if it cuts your gas mileage by half on a truck while towing... expect the range to be approximately half on the Tesla Model X.