Dear student,
The number of hydrogen in reactant is equal tot he valency of carbon. As in methane, the carbon is attached to 4 hydrogens and during oxidation of methane it gives :
The number of hydrogen reduced in the reactant side is equal to the number of oxygen in the product side because the molecule is formed according to the valency . The carbon bonded with 4 hydrogens in reactant side because hydrogen forms the single bond to 2 oxygen atoms because oxygen forms double bonds.
Regards