Determining the number of vertices needed to be selected.