The .22 is definitely on the light side. I'm sure 10 rounds would kill the dog eventually, assuming one could hit an attacking dog 10 times. However, an eventual kill is insufficient - a dog can have you on your back in the time it takes to fire half that amount. What is called for is the immediate, permanent cessation of hostile action within the minimum amount of time possible. Remember, as with a human, you may only get one shot to bet your life on. I think something in the 9mm/.357 category is the prudent minimum for man or beast.

FWIW, a drill we used in the military to simulate defending oneself against a dog went like this: take a two-liter soda bottle and attach it to 50' of 550 cord. While facing in a safe direction (and observing all applicable firearms safety rules) stand with the cord ran between your legs on the ground. Now have a buddy pull the cord, dragging the bottle toward you as quickly as possible, and try to engage it. The bottle roughly approximates a dog's vitals, and the movement closely approximates that of a real dog. We would do this drill occasionally with rifle, shotgun, and pistol, and it was surprisingly difficult.