Set with < --#set var="taskvar" value="1"-->
Echo with < --#echo var="taskvar"-->
Increment a variable: Can't be done in SSI.
See http://stackoverflow.com/questions/29651728/is-it-possible-to-increment-an-ssi-variable-by-1 because variables are just strings.
You can do it with CGI somehow: see http://docstore.mik.ua/orelly/linux/cgi/ch06_02.htm, but it looks tricky.