Fix vertexCount computation(bad refactor issue)