You can view this as 4 outer edges and 2 inner edges. Using all 4 outer edges forms a cycle. So can choose:
1) 3 outer edges: So this is $\binom{4}{3}*\binom{2}{1}$ = 8
2) 2 outer edges: You can draw $4$ different graphs with $2$ outer edges and $2$ inner edges.
So, this makes a total of $8+4 = 12$ spanning trees.