The usual method for measuring a yarn’s wraps per inch, commonly abbreviated as WPI, is taking the yarn and wrapping it around a WPI gauge or a ruler. Count the number of times the yarn wraps around the gauge and that’s the WPI, which is used to determine a yarn thickness*. The problem with wrapping yarn around a gauge is that it’s easy to stretch the yarn and get a skewed number. Jillian Moreno recommends rolling and moving the gauge instead of wrapping the finished yarn. I like to do something different.
My handspun isn’t always as consistent as I would like it to be. So, instead of measuring a short 6-12” segment of yarn which might be wildly different from another 6-12”, I measure WPI after the yarn is in a skein. I pull away a few strands from the rest and fit them into the gap on my gauge. If there’s space, I add a few more. If it’s crowded, I take a few out. The yarn isn’t stretched at all. Plus, the WPI is a more accurate average of the entire skein, and it’s a lot to harder to fudge the numbers.
I got my gauge from Girl on the Rocks a few years ago and it’s been a great tool.
One more thing. There’s not a lot of agreement on a standard WPI for yarn weights, much less an industry standard. Some sources match up and some don’t. This post from Ask The Bellwether offers a good explanation of the situation and includes tips for matching handspun to commercial yarn. Even though there's no agreed upon standard, I like measuring the WPI of my yarn since it makes it easier for me recreate or match a yarn later.