gallium/util: add a helper to compute vertex count from primitive count