Is it 9? I have doubt.
As mentioned, no. of edges = 9 is the necessary condition for the graph to be connected. Means, even if the graph has 9 edges then the graph may not be connected (some vertices may have more than one paths while other vertices are left out).
But the question is asking to ensure that the graph is connected, probably this means by adding these many edges, the graph must be connected. So we must check that addition of new edges doesn't add degree to already connected vertices. This can be ensured only if the rest of the vertices are completely connected.