Border Collie.. . Exactly what you want..
1. Small enough to be a decent house - family dog..
2. Excellent temperament.. ( Not "heel nippers", like the Corgi, Border Collies are "headers".. they stare down the lead animals..)
3. Bred to herd animals.. It's their nature.. They will herd anything.. sheep, ducks, cattle, horses, children..(and adults.)
4. They're too small to cause injury to valuable horses, and (generally) too fast to get caught by a flying hoof..
I recommend going to www.dogbreedinfo.com - They allow you to search based on what you want. So if you are searching for a herding dog click on the appropriate link, and you will find a lot of breeds. Australian Cattle Dogs may be a good choice for you. They are reasonably small but extremely rugged. The were bred to herd cattle by healing them. They are very good at it, and also make a good family pet - so long as they get plenty of exercise. They may attempt to herd you as well. They sometimes have a tendency to attempt to herd people and sometime even nip at their heals, but not all of them.
LOL....once in a while, we'll have deer crash through the fencing. And guess WHAT those horses think!?! The LAST time it happened, they were missing for a day because we didn't have the 'nose' to track 'em down. Plus we were on foot for the search.
After much huffing/puffing/heartbreaking panic, I decided we HAD to have a dog to help. (or else, annihilate all the local deer.LOL)