<?php // singleton database class require_once('db.class.php');$db = Database::getInstance();$db->query("Select * from ..."); // this counts number of rows $db->Count($tableName, $condition);?>