I do not know if you have APM, but using it would let you configure you some WMI Performance Counters that will poll the Win32_PerfFormattedData_TermService_TerminalServices WMI Class.
This class contains three interesting variables:
ActiveSessions: Number of active Terminal Services sessions.
InactiveSessions: Number of inactive Terminal Services sessions.
TotalSessions: Total number of Terminal Services sessions.
The page 41 of the APM Admin guide pdf file will detail you the steps to create a WMI Performance Counter Monitor.
does anyone have a working vbscript they can share???? I keeps trying to get this to work, but have had no success. I have tried vsarious scripts from the link below, but I keeps getting compilations errors.