I have had a dozen bites and tons of "near" run ins.
First lesson learned in bites. If a dog jumps at me with its mouth open and I have not wrestled, loved or generally gotten comfortable with the dog, I assume it is going to bite me, and it is going down. Come on, it's a 4 legged animal without opposable thumbs, that weighs 1/3rd of a human. A single dog is easy to catch in lunge, kick, and subdue. I won't say this about trained defensive dogs, or police dogs, but most yard pups aren't as vicious as they try to let on.
During my walks, I have had recuuenrent problems with lose dogs at night. Facing them and walking backwards with a flashlight trained on them works, but they will sometimes follow you for quite a ways. Gives you a good chance to pick up a stick.
The funniest was when some jerk would not call his dog off, for me to continue walking up he rail tracks behind their house. He yelled alot, threatened to shoot me, as I calmly kept repeating, "call your dog off and I'm gone." I finally got past the dog and was walking away, and about 200 yard later, I hear, "come back here!" I turned around, wondering why this crazy man would want me to return, and that dog was walking about 10 feet behind me at an easy trot, tail wagging, obviously having decided I was the better pack leader. . . I stopped, the dog caught up, I pet him once and sent him back home and laughed the rest of the morning about the nature of dogs and people.
Now, the dozen bites? Almost ALL of them came after, "It's okay, she doesn't bite". And did not happen when I was hiking, but at friends houses.