Remark
There is a formula that describes this event. In a convex polygon with n sides, you can create n - 2 triangles.
Without loss of generality, you could call this a regular octagon. It will not matter that it is regular; it will still be convex. See the diagram below. There are 6 such triangles.