Re counting guesses: Best you should do a little searching... try "increment" and "Perl" as your search terms on the likes of DDG... or use Super Search here.
And please show some effort at solving your own questions before you come here with a 'gimmé' -- a question demonstrating no effort whatsoever.