Molecule on the whole is neutral, so if it is made of several ions, their charges must cancel. We know that acids like HCl or HNO3 are monoprotic and they dissociate giving anions with a single negative charge - Cl-, NO3-. That means in a salt like FeCl2 Fe must be +2 - otherwise the molecule would be not neutral. It also means in Cr(NO3)3 Cr must be +3 for the same reason. That allows a quick calculation of oxidation number for the metal. It doesn't tell us anything about oxidation numbers of N nor O in NO3-.