The gauge formula
Gauge is stitches (and rows) over a set distance, usually 4″ or 10 cm. Divide to get stitches per inch, then multiply by the size you want.
stitches = (gauge stitches ÷ 4″) × width rows = (gauge rows ÷ 4″) × length
At 22 sts / 4″ a 10″ piece needs 22 ÷ 4 × 10 = 55 stitches. For crochet foundation chains, add your turning chain.
Following a pattern at a different gauge
If the pattern says 100 stitches at 20 sts / 4″ and you get 18 sts / 4″, those 100 stitches come out at 100 ÷ 4.5 = 22.2″ instead of 20″ — about 11% bigger. For a sweater, that’s a whole size. Either change needle size or cast on the number that gives the width you want at your gauge, rounded to the stitch pattern’s repeat.
Measuring a swatch
Make the swatch at least 6″ wide in the pattern’s stitch, wash and block it, then count stitches across 4″ in the middle — the edges are distorted. Count half stitches; at bulky gauges half a stitch over 4″ changes a sweater by inches.