tracking telnet sessions

is there any way to keep a count of telnet sessions to a qnx box?
The count should be decreased if the telnet session was closed properly, and increased whenever a new telnet session is opened?
i know devc-pty is responsible for the sessions, but is there a way to info on the telnet sessions themselves?

You could monitor how much instances of telnetd are running or you could write a program that would replaced telnetd in inetd.conf and then spawn telnetd and keep track them.