The origin of such terms may be rather old. In the case of redox processes, the terminologies were at first defined as "oxidation=oxygen uptake" and "reduction=oxygen loss" something like 200 years ago. Back then, the existence of nuclei and electrons was unknown.
Later, when scientists started to understand the building blocks of nature, they often decided to keep and generalize the old terms, so sometimes you get terminologies that would, when taken literally by their original meaning, no longer make sense.
So, the oxidation number is now defined in both ways. It's a bit like the German term for the slope of a straight line, "Steigung", which literally means "rise". Of course rising would mean going upward, but if the slope is negative, German math "rises downward".
The current IUPAC Gold Book definition of oxidation state is: The oxidation state of an atom is the charge of this atom after ionic approximation of its heteronuclear bonds.
The term oxidation number is nearly synonymous. (Wikipedia)
"Cl has O.N = -1." Atom Cl has O.N. = 0, Cl in HClO4 O.N. = +6, in NaCl O.N. = -1