Why don't you assign oxidation numbers to the carbon atoms undergoing reaction and see how they change? This is a bookkeeping device, but IMO it is a useful one. The oxidation number of a carbon atom = (number of bonds to O, N, Br, Cl, etc.) - (number of bonds to hydrogen). If a carbon atom changes its oxidation number from +1 to +2, for example, it has formally lost one electron.