Step 1: Interpret $\mathrm{Tr(A^TA)$.}
For any real matrix $A$,
\[
\mathrm{Tr}(A^TA)=\sum (\text{squares of all entries of }A)
\]
Since $A$ is of order $3\times 2$, it has $6$ entries. Step 2: Possible squares of entries.
From the set $\{\pm2,\pm1,0\}$:
\[
(\pm2)^2=4,\quad (\pm1)^2=1,\quad 0^2=0
\]
We need the sum of squares of the 6 entries to be $5$. Step 3: Case-wise counting. Case I: One entry contributes $4$ and one entry contributes $1$.
Remaining $4$ entries must be $0$.
\[
4+1=5
\]
Number of ways:
\[
\binom{6}{1}\binom{5}{1}\times 2 \times 2
=6\times5\times2\times2=120
\]
(choices of positions and signs) Case II: Five entries contribute $1$ each.
Remaining one entry must be $0$.
\[
1+1+1+1+1=5
\]
Number of ways:
\[
\binom{6}{1}\times 2^5=6\times32=192
\]
Step 4: Total number of matrices.
\[
120+192=312
\]