In the spirit of keeping things short, what do you think of something like:

In the Miniskirt class:
``` ruby
@counts = Hash.new 0
```
In this method:
``` ruby
v.sub(/%\d*d/) {|d| d % n ||= @counts[name] += 1} % attrs % n
```