How many triangles are there? The question is how many triangles are there in the following picture?

I have thought to solve it by creating a formula based on the angles of the lines starting from the bottom of each side. I don't get it right though. Any clues/ideas would be appreciated.
 A: You can model this using the graph theory. Then make an algorithm that will solve the problem.
Every line that ends connecting more than one line is a node. Find all nodes. 
Then start from one and look for graphs that contain 3 elements.
A: I think I found an easier solution for this specific problem without complicating it too much.
We have one basic kind of triangle, and that is the one that our big triangle contains 4 of. Let's call that order 1.
If we count the triangles inside order 1, we find out that they are 16. They are not so many so we can actually count them manually.
So long we have 16 triangles times 4, 64 triangles.
Now by combining 4 order-1 triangles we get new triangles that originate from the combination.
Lets count the new triangles for ONE side only. Be careful because some of them can be mirrored and some cannot. Actually there is only one that cannot be mirrored.
That gives us 13 new triangles for ONE side only from the combination of order 1 into order 2.
Now we have 13 more for every time we turn the big triangle around. So now we have:
16*4 + 13*3 = 103

Don't forget the big triangle!
16*4 + 13*3 + 1 = 104

Woho, solved! =)
A: Another longish way would be to label all vertices and check if all triples give you triangles. 
A: This forms part of a problem on the Project Euler website and as you can see your particular example is $T(2) = 104.$
A: Using Burnside's lemma, the number of triangles is equal to $6n-22$ where $n$ is the number of orbits of the action of $D_3$ on the set of triangles. 
To count them, notice that : 


*

*Every orbit contains one the four triangles in the bottom right-hand corner of the big triangle. 

*Two triangles in the same orbit are isometric.


So you only need to count twenty-one orbits rather than one hundred and four triangles.
A: @Sp3000 is right, this is actually $PE-163$, and your particular case is given in the problem statement $ T(2) = 104.$
But if you are looking for a general formula to count the number of triangles in higher order then check here, (spoiler for the original PE problem).
