Let $S$ be the set containing all $3 \times 3$ matrices with entries from $\{ - 1,0,1 \}$. The total number of matrices $A \in S$ such that the sum of all the diagonal elements of $A ^ { T } A$ is 6 is $\_\_\_\_$ .
Let $S$ be the set containing all $3 \times 3$ matrices with entries from $\{ - 1,0,1 \}$. The total number of matrices $A \in S$ such that the sum of all the diagonal elements of $A ^ { T } A$ is 6 is $\_\_\_\_$ .