in reply to best way to keep a simple count?

You could use Inline::Files and store the counter with the script itself.

the lowliest monk