8 Lug and 10 Lug describes the # of lug bolts/nuts used to secure the wheel to the hub assembly. Notice the # of holes outside the center large hole.
6 Lug
8 Lug
10 Lug
Rim/tire sizing depends on more then just the lug count. The diameter is also specified with most rims being either 22.5 or 24.5 with some shorties having the smaller 19.5. Rims will also have a different width to them as well which will be matched to the tire width. There's also other specifications involved in determining rims.
You can have both 8 and 10 lug rims in the 22.5 and 24.5 diameter. Most of the time the 8 lug variants are on lighter duty axles, however, that's not always the case.