Equity is the residual claim
Common shareholders own a residual claim after creditors and other senior claims. Contributed capital records owner investment; retained earnings accumulates earnings less distributions and other relevant changes. Treasury stock or repurchased shares reduce equity under the applicable presentation. Preferred shares can have priority rights and may receive different accounting depending on their terms.
Raise equity, then earn income
A business issues 1 million shares for $10 each. It raises $10m cash and equity. Issuing shares is not revenue. If the business later earns $2m and pays $0.5m dividends, retained earnings increase by $1.5m, assuming no other movements. Paying the dividend is not an operating expense.
Market capitalization equals market price per share times the relevant number of outstanding shares. Shares authorized, shares issued, shares outstanding and weighted-average shares are distinct counts. A company may authorize many shares without issuing them, or repurchase shares that no longer participate like outstanding common shares.
Stock-based compensation pays people with an equity-related claim. It may be noncash in the period of expense recognition but still represents an economic cost to owners. Ignoring it in earnings while ignoring dilution in valuation can give a doubly optimistic result.
Buybacks reduce share count and cash or increase debt if financed by borrowing. They may change EPS mechanically. Whether they create value depends on price paid, alternative uses of capital, funding and the business's prospects—not the fact that EPS rose.