You need to declare the global variables BEFORE the function definition within the TCLCaller, then declare the variable as 'global' within the function.
eg.
-----------------------------------------------------------------------------------------
variable term
set term 1
proc MyFunction {} {
global term
FME_LogMessage fme_inform "term = $term"
set term > expr $term + 1 ]
# Set NEW attribute like this ..
return $term
}