Triangles Numbers counting 
How measure to number of triangles??? any helps??
I want to calculate it  by  using a formula.

My answer has mathematics and observation.
My approach is to get the number of triangles of a paricular size, and then add that to the next size, and so on.
First, as your figure has four small triangles on each side, I take t as $4$. But that comes later.

Starting with triangles of Size $1$. The number of Size $1$ is $1$ on the top row, $3$ on the second, $5$ on the third, and so on. In fact, it starts with $1$ and goes in an Arithmetic Progression of common difference $2$. This makes it the series of odd numbers from $1$. 
As we all know, the sum of all odd numbers from $1^st$ to $n^{th}$ is $n^2$. That is, $1+3+5+7+...+(2n-1) = n^2$
And since that is what we have here, 

The number of triangles of Size $1$ is $t^2$.


Onto Size $2$. You will see that the triangles of Size $2$ begin at the second line from the top. In fact, for this kind of figures, triangles of size $a$ will begin at the $a^{th}$ line from the top. If we see here, there is $1$ such triangle on the second line, $2$ on the third line, and so on. But here, it continues only until $(t-1)$.
As we know, $1+2+3+4+...+n = {{n(n+1)}\over2}$. Here, $n$ is $(t-1)$. So, it is changed to $(t-1)\{(t-1)+1\}\over2$, on simplifying which we get $t(t-1)\over2$. So, 

The number of triangles of Size $2$ is $t(t-1)\over2$.


For Size $3$, the triangles will start from the third from top, and continue from $1$ till $(t-2)$. Going by the same method applied above, we get that 

The number of triangles of Size $3$ is $(t-1)(t-2)\over2$.


Taking into account upside down triangles of sizes $2$ and above in figures of sizes $4$ and above gets us ${\sum_{n=4}^{t}{2(n-4)}}+1$
This goes on and on, so the final formula for total number of triangles $n$ in a figure of side $t$ is:-





$$\small{n=t^2+{{t(t-1)}\over{2}}+{{(t-1)(t-2)}\over2}+{{(t-2)(t-3)}\over2}+{\cdots}+{{1×0}\over2}+\{\sum_{n=4}^{t}{2(n-4)\}}+1}$$





Which can also be written as:-





$$t^2+{{\sum_{n=0}^{t-1} {(t-n)(\{t-(n+1)\}\over2}}}+{\{{\sum_{n=4}^{t}{2(n-4)}}\}+1}$$





