+1 - Might be hackish, but if it works this would be my preferred method.
–
t31osMar 4 '11 at 15:46

Thanks wyrfel. This is exactly what I was looking for.
–
Scott BMar 4 '11 at 17:24

@Scott B: One more thing...if you have a chance to do this within your own class, i'd strongly recommend that, as you can then store the counter as $this->widget_counter rather than dumping it into the global scope (which is what i don't like about this solution).
–
wyrfelMar 4 '11 at 19:46

Just wanted to add ( this came up in search) that using something like this to hard-code widget styles will break styles if you drag widgets around or add any new widgets.
–
WyckSep 1 '11 at 23:27