update TotalTerminalNumber