Correctly retrieve number of vertices