頭【とう】 is a counter for what are usually herd animals. Cows, elk, horses, elephants... The four legged thing might also be a factor. You don't necessarily have to see them on a ranch for foodstock purposes, but it's that kind of animal.
ひき is the counter for pretty much every other kind of animal that isn't covered by a more specific counter like
羽【わ】 for birds.
A point that arose in the comments below which is important enough to make sure it's seen with this answer:
A key factor seems to be the human relationship to the animal, and whether that animal can be reared, hunted, or exploited in some way. As was pointed out in the comments,
頭 can be used for bears if the context is hunters harvesting them. At least one example of this was found, though I suspect this usage is extremely limited in scope.