What's "WPI"? It stands for "wraps per inch." Literally, you determine wpi by wrapping yarn around a ruler for one inch, with each strand of yarn being wrapped parallel and next to each other. Be careful not to wrap too tightly, no twisting or crossing the yarn either. Just try to wrap with a moderate tension and keep the yarn flat and smooth against the ruler.
Once you've finished wrapping, you count the number of parallel strands within the 1 inch. Usually, there will be about 16wpi for fingering weight yarn, 8 wpi for bulky weight yarn, and somewhere in between for worsted and DK weight yarns.
This technique is one way of determining the density or weight of a yarn and often is used by hand spinners to help categorize their yarns. It's also a way of determining if different yarns can be substituted for each other in a pattern.