This is not a correct understanding of "market cap". Goldman's market cap includes the value of ALL shares, not just the shares available for public trading.
But you're correct, there's only one entity, and the 511M shares represent both stockholders and (former) partners.