In windows:
c:>netstat -a | find /c "TCP"
68
Shows number of TCP/IP connections. Useful if you are troubleshooting high network systems that are running out of TCP ports and need to increase [MaxUserPorts][1].
[1]: http://support.microsoft.com/kb/196271