I have found that a lot of the time when I do have an encounter with a dog, which is often, they just want to run with you. I have had many dogs run along with me just because they wanted to run. I did not mind at all. Around here there is lot's of countryside and dogs are a part of life. Of the hundreds of dogs I have encountered over the years while biking I have never had one attack me or knock me off my bike.
I have learned though when approaching a hedge row out in the country to be aware of hidden driveways, dogs seem to appear out of no where, scaring the wits out of me. A lot of the time I enjoy trying to out run the dog, I have got in some really awesome sprints. If you approach the situation right you can get a great benefit out of it.
One or two dogs is usually not a problem, but if you have a pack of them it does not matter how tough you are you will get torn apart if you confront them.