Note that the sum of the degrees of vertices is equal to twice the number of edges.
So,here the sum of the degrees =21*2 = 42
Now,assume there are k vertices of degree 2 and we have 3 vertices of degree 4
So, the sum of the degrees of the vertices are (3*4) + 2k
Hence, (3*4) + (2*k) = 42
=> k = 15
So,the total number of vertices is 15 + 3 = 18.
Hence,Option C is the correct answer.