- is each element a generator here? if not why?
Take the $2$ and calculate $2 \cdot 2 \cdot 2 \equiv 8 \equiv 1 \mod7$. Therefore, not every element is a generator.
- is an element considered as generator only if $Order(G) = Order(g)$ i.e $Order(g) = 6$ hence $g=3$ is a generator.
A generator must generate all the element. If the order of $Order(a) = x < g = Order(G)$ then it cannot generates all the elements. $a^x =1 $ and the cyclic sub-group generated by $x$ contains only $x$ elements:
$$a^1,a^2, \ldots, a^x = 1$$
- is there any formula to find the number of generators?
No, there is no formula.
- Some website says $\varphi(n)$ gives the order of group some says $\varphi(n)$ gives the number of generators some says $\varphi(n)$ gives the number of elements with a multiplicative inverse. Which of these is correct?
Remember the $\mathbb{Z_7}$ is a field.
- $\varphi(n)$ gives the order of the multiplicative group. In your case $\varphi(7) = 7-1 = 6$
- 2 and 4 are not generators therefore $\varphi(n)$ cannot give the number of generators.
- Being a field implies every element is invertible, thus $\varphi(7)$ gives the number of invertible elements, also for the composite case $-\mathbb{Z_n}-$, where $n$ is a composite number, $\varphi(n)$, gives the number of invertible elements.