How to know number of connection open for mysql using php

Hi i want to know how many connection is opened in php ,which one is best to mysql_connect and mysql_pconnect ?

pconnect will open a persistent connection. If one is already open using the same user/pass identifier, it will use that one, and thus you would (should) only have 1 connection open at a time.
connect will open a connection for the length of execution of the script (or until mysql_close() is called).

Note: Use of the MySQL library is now considered discouraged. Consider using the mysqli or PDO libraries.

The number of opened connections to a mysql server can be found by issuing a query for SHOW STATUS; this will, among other things, return a field for Threads_connected

you have to run the query to get the number of connections as said.

should i use mysql_close() after every connection open ,else it will automatically close