Finding the valency of transition metals in coordination complexes I understand how to find the valency of atoms in small organic compounds. For instance, for CH4, the valency of carbon is 4, while the valency of each hydrogen is 1. But for a coordination complex, for instance:

How do I find the valency of the center metal?
And if the center metal was bound to another metal:

How would the valency calculation change, if at all?
I need the valency of these transition metals because I wish to ultimately find the d^n configuration of the transition metal in the complex via the formula:
n = group number - valency
EDIT: If you have a different approach (apart from using valency) for finding the d^n configuration of the transition metal, feel free to suggest that instead.
For the first example, you are given that there are $6\, \ce{CN}$ ligands which are -1. That means that there is a total of 6- from the ligands. We also know the overall charge of the complex is -3. That means the charge of the central metal must be +3. In the second example, we can look at the charge again. Because the $\ce{CH3-}$ has a  charge of -1, the molybdenum metals must have a +3 oxidation state each to counteract the -6 total charge from the $\ce{CH3-}$ groups. To do these problems, you should look at the charges of the ligands/metal(s) and the total charge of the complex and know that they have to match. After you figure out the oxidation state, you can find the $\mathrm d^n$ configuration by removing electrons from the $4\mathrm s$ subshell first and then 3$\mathrm d$. For example, For $\ce{Fe^{3+}}$, a neutral $\ce{Fe}$ atom has $6$ $3\mathrm d$ electrons. You first remove 2 electrons from the $4\mathrm s$ subshell and then a final one from the $3\mathrm d$ subshell. Finally, you will find that $\ce{Fe^{3+}}$ is $\mathrm{d}^5$. Again, this is based on the oxidation state of the metal.