To count triangles join all diagonals.
number to each trianle from 1 to 64 as here are 64 small triangles.
consider 1 × 1 square there are (4 + 4) triangles and total squares are 16
total triangles = 16 × 8 = 128
consider 2 × 2 square there are 9 such squares
consider triangles with 4 numbers = there are 4 triangles in 2 × 2 square.
total triangles = 9 × 4 = 36
consider 3 × 3 square there are 4 such squares
consider triangles with 8 numbers = there are 4 triangles in 3 × 3 square.
total triangles = 4 × 4 = 16
consider triangles with 18 numbers = there are 2 triangles in 3 × 3 square.
total triangles = 4 × 2 = 8
consider 4 × 4 square there is1 such squares
consider triangles with 32 numbers = there are 2 triangles in 4 × 4 square.
total triangles = 1 × 2 = 2
total triangles = 128 + 36 + 16 + 8 + 2 = 190
-------