The Japanese state does not "own" companies in the manner of a sovereign wealth fund holding equity. Japan has a market economy with privately held, publicly traded, and foreign-owned corporations.
However, the Government of Japan holds strategic stakes in a few entities (e.g., Japan Post Holdings, Japan Tobacco — though reduced), and the Bank of Japan holds massive ETF portfolios (indirect equity exposure).
The listed giants—Toyota, Sony, Nintendo, Panasonic, SoftBank—are publicly traded corporations with global shareholders, not state-owned enterprises.
If the question implies "How many companies are *headquartered* in Japan?" — there are ~3.8 million registered companies (2023), ~4,000 listed on the Tokyo Stock Exchange.