Yeah, I concur with Heather. There’s no predicting loose dogs, though they’re more prevalent in rural areas. I too just shout at them as loud as I can, which usually scares them off. (And keep in mind, I’ve probably had only four or five run-ins in the last 22 years of running in Ithaca; it’s not common.)
The one time I had a real problem was riding the ElliptiGO out near Locke about 10 years ago. I was going up a hill, so moving fairly slowly, and a pair of dogs came out at me. I can’t remember if it was an actual junkyard or just a farm with a lot of equipment lying around, but because I couldn’t go fast enough up the hill, I couldn’t get away. So I hopped off and shouted at them. Had there been only one dog, that might have worked, but in this case, the alpha dog couldn’t back down without losing face in front of the beta dog, so it took me a while to walk away holding the ElliptiGO between me and the dogs. I didn’t have a pump or anything to protect myself with, though I think I tried throwing gravel with some efficacy. No rocks around; nor were there any people. Generally speaking, I think people would come running if someone is shouting and control the dog.
In short, the anecdotes can seem a little scary, but the actual likelihood of there being a problem is very, very low and could happen anywhere. So it’s worth thinking about how you’d react if a dog was threatening, but I don’t think it’s worth changing your behavior in a major way.