In the simple case it is exposure divided by contract size. In practice it is scaled by a beta or regression slope, because the futures contract rarely moves one-for-one with the thing being hedged. For interest rate hedges the scaling uses dv01 rather than price.
Over-hedging turns a hedge into a speculation in the opposite direction; under-hedging leaves exposure uncovered. Both are common because the ratio must be re-estimated as portfolio value and volatility change — a hedge set once and forgotten drifts.
Example: a $5,000,000 equity portfolio with a beta of 1.15 against the S&P, hedged with es at index 5,000 and $50 per point. Contracts = 5,000,000 x 1.15 / (5,000 x 50) = 23 contracts short.
Related: cross-hedge, basis-risk, dv01, es, short-hedge