Aesthetic reasons not withstanding, I'm not sure how you plan on resetting your counter without keeping track of which file you're working with in some way. There are some other things you might try, but from where I sit, you're going to wind up writing something resembling the code that you're trying to avoid.
I think there's something in PBP to the effect of "don't be elegant" anyway. The aesthetics you're working with today may not be the aesthetics you're working with a few months from now, or that the next guy uses. The code that you already know how to write and are trying to avoid, on the other hand, is pretty straight forward in what it does. That may be more meaningful for you in the future than whether or not it's pretty.