If the resistor connected to a battery is heated due to current flowing through it, then resistivity and resistance of conductor increases. But due to increasing temperature, relaxation time of electron decreases and hence drift velocity of electrons decreases. Number of free electrons in the conductor does not depend on the temperature for a given current i.e. number of free electrons remains unchanged when a resistor connected to a battery is heated due to the current. flowing through it.