System Variables › &MAINSESS
Returns the number of currently defined sessions. This is equivalent to &MAI#SESS.