The purists might not call it a closure, but it operates under the same principle. In your second example, counter() makes a reference to $count, a lexical in the scope of the function. It's the same principle, just without the indirection of a function reference.
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart