At the end of the day there's no one metric that can tell you the "size" of a company, because the term is too broad.
It's not the company's actual value, but rather the company's actual valuation. Related, but very different, concepts.
Simple example: Celery has no value to me, because I find its taste disgusting. However, I happily pay for bundles of cilantro, which in turn have no value to others that find its taste disgusting.
In the case of a publicly traded company, the conditions are "if all shares were immediately liquidated at the current price". In the case of a company buying that publicly traded company, an actual value can be arrived at, due to having a fixed set of assets, liabilities, and participating entities. And, as you pointed out, those two numbers rarely match up.