Shortcut to count number of lines subtracted?

If we are trying to subtract the number of lines which aren't triangles for a question with a square of bigger dimensions (say a \(20 \times 20 \) square), wouldn't it be more tedious to count the number of lines rather than a \(3 \times 3 \) square? Is there a shortcut to count these "bad" 3 dot combinations?