in reply to understanding closures

I think what's not being stated explicitly is that in your first example, you've created an anonymous subroutine and then returned a reference to it. Executing the coderef triggers the code, despite the fact that it's in a different lexical context than the coderef. You passed in the value to count_maker(), and the value was passed to the anonymous sub because that sub is in the same lexical context as the $count you shifted in.

In your second example, my $count is in the lexical context of the do{} loop. You don't have strict turned on, so you can access counter(), but the my $count there overrides your declaration of $count in the for{} loop.

Closures are subtle, but in the context of what you're trying to do, you should be returning a coderef for it to work. Once you get that, read some of the closure articles again.