I guess it is defined as $\sigma :\Bbb Z_{12} \to \Bbb Z^*_{38} $ and $\sigma(1)=a $ and since $\phi(38)=18$, the order of $a$ must divide 12 and 18 so must $(12,18)=6$ . $|a|$ can be 1,2,3 and 6. there is 1 element in $ \Bbb Z^*_{38}$ which has order of 1.
and there is 1 for order 2, 2 for order of 3 and 2 for order of 6.
so the answer should 1+1+2+2=6. Is this correct? or do we just say there are 4 number which divides 6 therefore the answer is 4?
You have found the right answer of $6$, but your argument is not quite complete. If you knew that $\mathbb{Z}_{38}^*$ were a cyclic group of order 18, your argument would work. But for instance, it might be isomorphic to $\mathbb{Z}_2\times\mathbb{Z}_3\times\mathbb{Z}_3$, in which case you can check that all 18 of its elements would be potential values of $a$. Can you prove that $\mathbb{Z}_{38}^*$ is cyclic?
(By the way, an easier way to come up with $6$ without having to enumerate each of the possible orders is the following. You know that $a$ must be some element of $\mathbb{Z}_{18}$ such that $12a=0$. By inspecting the prime factorization of $a$, you can see that $12a=0$ (i.e., $12a$ is divisible by $18$) iff $a$ is divisible by $3$. It is now easy to count that there are $6$ different multiples of $3$ mod $18$.)