<?
$sql =
"SELECT COUNT(*) AS count FROM table WHERE this = '$this'"
;
$result = mysql_query
(
$sql
)
;
while
(
$row = mysql_fetch_array
(
$result
)
)
{
$count = $row
[
"count"
]
;
}
echo $count;
?>