A couple things I'd check.
I'd manually check your theme.inc.php file to see if you see the variable name and number stored in there.... make sure it's getting written to the file.
If all there is OK, then the problem is most likly with the modifications to ubbt.inc.php... most specifically the loop that lists them. I'd verify those steps were correct, maybe even start with a clean ubbt.inc.php and try it again, to narrow down the problem.