if you have n vertices, think n-1 vertices are forming complete graph, therefore $\binom{n-1}{2}$ edges are used.
therefore with one more edge you should connect the remaining vertex.
total edges = $\binom{n-1}{2}$ + 1
but this is not necessary condition, it is sufficient condition.