Thanks Ian,? I think that was one of the permutations I tried - but I ended up with $COUNTER containing something like "10 -1 -1 ...." or somesuch.
I'll have another go though,