Cap the number of vertices.