Do not confuse coordination number with the oxidation state of the metal.
In $[\text{Co}(\text{NH}_3)_6]\text{Cl}_3$, the coordination number is 6, while the oxidation state of cobalt is $+3$.
Only count the ligands inside the square brackets; counter-ions outside the brackets do not contribute to the coordination number.