Question: how do you know how many electrons are transferred?
Answer: Alternatively, the each carbon atom is oxidized from +2 to +4, which is two electrons per atom. Thus, the carbons atoms undergo a (3 atoms)(2 electrons/atom) = 6 electron oxidation. Either way, 6 electrons are transferred.