Determine a formula for the number of triangles in the line graph $L(G)$ in term of quantities in $G$
I know that the line graph $L(G)$ of $G$ is a graph whose vertices are one to one correspondence to the edges in $G$ such that 2 vertices of $L(G)$ adjacent iff the corressponding eges in $G$ adjacent.
So let $a,b,c$ be vertices in $L(G)$ then we have the triangle $a,b,c,a$ if the edges $a,b,c$ is on $K_3$ or$K_{1,3}$.
How can I use this to find the formula for the number of triangles in the line graph $L(G)$ in term of quantities in $G$
If the incidence matrix of a graph $G$ is known (denote it by C, which is a $m\times n$-matrix),
then the adjacency matrix of the line graph $L(G)$ is $L=C^TC-2I_n$.
Then, $\frac{trace(L^3)}{6}$ is the number of triangles in $L(G)$.