$query="SELECT COUNT(id) FROM `table` WHERE `abc`='123'";
$result = mysql_query($query);
$count = mysql_fetch_row($result);
This will work fast and light. Also, as Jack said in the comments above, you should use either MySQLi, or PDO, because the MySQL addon has been deprecated by PHP.