...
$num="select count(*) as total from xy_info";
$result=mysql_query($num);
$row=mysql_fetch_object($result);
$cc=$row->total;
...