Well, you use certain counters when counting different types of things. It’s kind of like using “dozen” as in “2 dozen eggs,” or “pair” as in “4 pairs of shoes.”
For example, 匹 (ひき) is used when counting small animals. When using counters, quite a few of them can change in pronunciation when using certain numbers. 1匹 (いっぴき) would be “one (small animal),” 2匹 (にひき) would be “two (small animals),” and 3匹 (さんびき) would be “three (small animals).”
You can usually view these counter rules under the definition in the dictionary section. There are many types of counters, but you can stick with only a select few and still be fine most of the time.
Check out “counter punch” game on renshuu, you don’t need to learn all counters because you’ll be understood anyway but useful to know most common ones
You know how English has uncountable or mass nouns? You can't normally say “I drank *two waters.” To quantify a noun like water (in the sense of a drinkable liquid) with a numeral, you must also state the unit. For example, cups or glasses (杯). In Japanese all nouns are like that. All need some counter to serve as the unit when combined with a numeral, even if it sounds superfluous and devoid of meaning, like in “two pieces or units of equipment,” or “two head of cattle.” Incidentally, it's exactly head (頭) of cattle, horse, and other large animals in Japanese, even though 二頭の馬 translates as nothing more than “two horses” in present-day English.