It is easy to determine the number of valence e? a TM metal has (provided you have a PT!). Just find it in the PT and look which group it is in and that gives you the number of valence e?. Ti (Z= 22) is in Group 4 and so has four valence e?. Re (Z= 75) is in Group 7 and has seven valence e?, Ag (Z = 47) is in Group 11 and hence has eleven valence e? , and so on. Up to Group 7 the maximum oxidation state exhibited by a TM is its Group number. Ti(IV) as in TiO2; and Mn(VII) is found in [MnO4]^-. Fe does not form any Fe(VIII) cmpds, but Ru(VIII) and Os(VIII) are found in the tetroxides RuO4 and OsO4. This is the maximum oxdn number known.
The problem comes in how these valence e? occupy the nd and (n+1)s valence atomic orbitals. Let's deal with with the 1st Row TM (Ti ?Cu) first. In the gas phase the uncharged atoms have the e? configuration [Ar] 3d^n 4s^2 We will not discuss why the higher energy 4s AOs are occupied first but it is fully understood. The exceptions are Cr: [Ar] 3d^5 4s^1 and Cu [Ar] 3d^10 4s^1. A hand-waving argument of extra stability associated with half-filled and completely-filled d shells is used. Just be content that it is a quantum mechanical effect called spin exchange. When the 1st Row TM forms the M^2+ or M^3+ ion (the common oxidation states of 1st Row TM) the higher energy 4s e? are lost first. Thus Cr(III) is [Ar] 3d^3. Take Fe(0)(g) : Group 8 so eight v e? [Ar] 3d^6 4s^2;
Fe(II): [Ar] 3d^6; Fe(II): [Ar] 3d^5
When you get to the 2nd Row you throw all these "rules" out the window. You can look up the Wikipedia entries (RH panel) for Ru, Rh and Pt and see if the half-filled d shell works. So only an expert will know what the configuration is in the gas phase and questions like this should not be given to undergrads until 4th yr. However Mo is in Group 6 and has an e? config [Kr] 4d^5 5s^1 so the half -illed d shell works here (but W the third row member of Group 6 is [Xe] 5d^4 6s^2 !). So the best answer quoted by vekkus4 is wrong on two counts. Once again when forming the cations the 5s e? are lost first: Mo(III) is [Kr] 4d^3.