The yarn number for cotton and most synthetics is calculated by a specific weight of yarn to a specific length. The system is based on a "1s" yarn having 840 yards in one pound. The higher the number, the thinner the yarn. For example, “20s" yarn will have 16,800 yards to one pound, or 20-840 yard lengths.
Yarns are referred to as singles or doubles, depending on whether they have a single strand of yarn or a double strand. Yarn used in T-shirts is typically singles and is commonly found in the 24 to 36 size (e.g. 24 singles or 36 singles).
Typically, the rule of thumb is: the thicker the yarn, the smaller the number. However, if the material is knitted loosely this may not be the case. Higher numbers or more singles, such as 30 singles or 40 singles, feature a finer thread with a tighter weave. This means a softer, lighter garment.
Next time you're shopping for Ts, keep an eye out for the lingo!
Source: "The Encyclopedia of Garment Decorating"