Calculating the charges of anions and cations
Some basic knowledge of the atoms in the periodic table is necessary to extract the ionic charges. In the case of $\ce{K2MnO4}$, for example, we know that the potassium ion is positive, and that the manganate ion is negative. We see that the compound is neutral: has zero net charge. So how can we place charges to get the molecule to be neutral, given the subscripts?

Potassium is a Group 1 element, meaning it only has 1 valence electron, placed in the  4s orbital. Potassium is eager to lose this electron to fulfil the octet rule. Therefore potassium ions have one less electron than protons, and the charge is +1. Since we have two $\ce{K^+}$ ions, the manganate ion must have a charge of -2 to make sure the molecule has zero net charge.

$$\ce{K2MnO4 &lt;=&gt;[\ce{H2O}] 2K+ + MnO4^2-}$$

Zinc is one of two transition metals that only have one (natural) oxidation state: +2. The electron configuration is [Ar]3d$^{10}$4s$^2$. When zinc becomes a cation, it loses the two 4s electrons. Knowing this, we see that the hypochlorite must have a charge of -1: the two hypochlorite -1 charges counter the 2+ charge of zinc.

$$\ce{Zn(ClO)2 &lt;=&gt;[\ce{H2O}] Zn^2+ + 2ClO^-}$$

I recommend not relying on simple rules, such as the one you mentioned. Rather, try to understand why the rule came about, and understand when the rule fails, and why. It really helps to be able to "read" the periodic table, as a lot of basic information is incorporated into it.