Knitting
Count over at least two inches in each direction. A single-inch count carries too much error.
— CPI
Loop rows along the fabric length
Condition the sample and let it relax flat before counting. Tension in the sample is the most common source of disagreement between mill and buyer.
Courses & Wales per Inch Calculator — free, with the formula and a worked example, at Textile School.