For companionship, I like to have a dog. They also make a decent early warning security system.
Where I live, though, I kind of need at least one cat to keep down local rodent populations. The dog keeps nutria from settling on my property, and occasionally kills one (she's strangely friendly with the local raccoons, though... thankfully they respect her territory)... but the cat kills mice and rats every single day. Unfortunately he also kills squirrels, chipmunks, robins, bluejays, woodpeckers, hummingbirds... on the upside he kills starlings and crows... and he defends the chickens from hawks.
Still, as much as I love my cat, I'm still more of a dog person.
...also, dogs are a lot more independent when they live outdoors on decent acreage. Dogs as house pets never made a lot of sense to me. Tends to make 'em neurotic in my experience.