If the film actually rewound in conjunction with the counter reset, then you could take enough shots with the lens cap on in a dark room to get you back to approximately where you thought you were. If you're off by a couple, or if the alignment isn't exact, you may lose a couple of your shots, but that's better than losing all of them.
If the film did not rewind, and is actually still in the same position, then you can just continue shooting until you hit the end of the roll. Your counter will be off for the duration, but should hopefully be correct for your next roll. If rewinding at the end of this roll doesn't also reset to 0 (i.e. it counts backwards past zero as it rewinds), then you may need to redo the battery insertion between rolls or at the start of the next.
Depends on how the counter works, I guess.