This may happen if you try to increment (
inc
command) a string variable. Verify that your variable is a numeric type.