added small optimization to only compute argsort of counts on document vertexes