Valence electrons of transition elements are all s electrons of the outer shell and the d electrons of the shell below.
How many are used in bondings depends on the element.
Manganese for example can give the two 4 s and 1 until 5 3 d max to get Mn-VII
Copper can have one 4s and one 3 d, stability of the element. Very seldom also Cu-III are reported with 2 3d electrons used.
Iron has two 4s and 1 d to get Fe-III , but Ferrates-VI also known with 4 d electrons.
"Case one: ns is half-filled and (n-1)d is less than full.
Is valence 1+number of electrons in (n-1)d or number of electrons in (n-1)d or 1?"
As I said it can be 1 for the s but also some d electrons. Chromium would be the case.
"Case two: ns is fully filled and (n-1)d is less than full
Is valence 2 or 2+ number of electrons in (n-1)d or number of electrons in (n-1)d?"
The same answer, almost every transition element.
"Case three, ns is fully filled, and (n-1)d is full
is valence 12 or 2 or 10?"
Stability reason only the s electrons, Zinc for example.
"Case four: ns is half-filled, and (n-1)d is full.
is valence 1 or 1+10 or 10?"
Again s + some of the d. Copper already mentioned.