Given a reaction:
AlCl3+K→Al+3KCl
If the number of electrons lost or gained during the changes is x. Then, the value of x is 3.
The balanced chemical equation is AlCl3+3K→Al+3KCl
The oxidation number of potassium changes from 0 to +1.
Thus, the change in the oxidation number per atom of K is 1.
Total change in the oxidation number for 3 K atoms is 3.
Hence, 3 electrons are involved in the redox reaction.
Thus, x=3.