As many as you can possibly tolerate at any given time.
I have 9.
Why do I have that many and no dogs? Because dogs are needy, clingy, and dependant. I tried having a dog and lasted a WEEK. I couldn't even be out of his line of sight or he would scream, yelp and cry like he was being beaten.
I have cats because I don't have kids. Dogs work if you have that sort of tolerance for someone needing constant care and attention. I prefer my cats. Give them food and a clean place to pee and I could be gone for weeks, they wouldn't even notice.