Witam sterownik bazy danych i chciałbym wprowadzić zliczanie zapytań sql, lecz nie wiem jak, mógłbym liczyć na pomoc?

<?
/*
|----------------------------------------
| DATABASE CLASS
|----------------------------------------
|
*/
class Database {
public $connection;
function __construct($host, $name, $pass) {
return $this->connection;
}
function error($type)
{
$text = '<h2>MySQL Error</h2>' . "\n";
switch($type)
{
case 'dbselect':
$text .= 'An error occurred when choosing database';
break;
case 'query':
$text .= 'An error occurred when executing SQL queries';
break;
}
$text .= '!<hr>MySQL said: <i>' . mysql_error() . '</i>'; } // one of the above errors appear when the parser encounters an error on its way
function select_db( $db_name) {
} // Select the database
function query($query) {
} // SQL query execution {free queries}
function insert( $into, $set, $free) {
return mysql_query("INSERT INTO $into SET $set $free"); } // SQL query execution
function select( $s, $from, $free='') {
} // SQL query execution
function update( $from, $free) {
} // SQL query execution
function delete( $from, $free) {
} // SQL query execution
function fetch_assoc( $assoc) {
} // download records into assoc table
function num_rows( $num_rows) {
} // count records
function fetch_array( $array) {
} // download records into array table
function __destruct() {
}
}
?>