Now the concept is
we have total 7 Edges and 5 vertices
and In spanning tree we know that no edges = |V| -1 = 4 right ??
Now from the 7 edges if we remove 3 edges in such a way that the graph doesn't contain any cycle
Condition one : 5C1 {Number of spanning tree possible doesn't contain BC and BD }
Condition 2 : Number of spanning tree does contain BD edge
Here 2 cycles are formed {ABD} and {BDCE}
2C1 x 3C1 = 6 ways [2C1 -- > remove any edge from AD or AB ] [3C1 --- > remove any edge from {DC} or {CE} or {BE}]
Condition 3 : Number of spanning tree contain edges {BC}
2c1 x 3c1 = 6 ways
Condition 4 : Condition 3 : Number of spanning tree contain both {BC} and {BD} edges
1C1 x 2C1 x 2 C1 -- > [we must have to remove DC ..because cycle is form therefore 1C1 & remove edge {AD} or {AB} by 2C1 or remove edge {BE} or {BC} required 2C1]
Add all the conditions
5 + 6 + 6 + 4 =21 Ans