So I have an assigned variable in smarty:
{assign var=number value=0}
Now I can increment it using
{$number++}
If I had to do this I would do something like the following: {php}$number++{/php} but it is very ugly to have to use php in a smarty template. This might suggest that there is a better way of doing what you planned to do.
{php}$number++{/php}