Let's say this mesh has size $n=4$.
Number the rows $r$, where $0\leq r\lt n$.
Number the columns $c$, where $0\leq c\lt n$.
There are $n^2$ vertices and $2\,(n-1)^2$ triangles.