Yeah, it is a complicated topic, but it comes up a lot. It might help to show how it dissects so you can put together similar structures later on. It’s basically a way of expressing a quantity of something specific, so it takes this form:
{quantity} {counter} の {specific thing}
So going back to your example:
{specific thing}= this is the easiest, we know it’s a cat, 猫「ねこ」
{quantity}=3 (reading is going to likely be さん.)
{counter}= since cat is a small animal, we’ll use 匹. The numbers 1, 3, and 8 typically affect “h” sounding counters, thus the reading changes from ひき to びき
Then plug those into the formula and bam, さんびきのねこ
This is only one way that counters are used, and it does take time and practice. The more examples you see the more it will start to make sense.