Are you trying to display the total number of rows/records in your table? Try this:
$sql = "SELECT * FROM table";
$query = mysql_query($sql) or die(mysql_error());
$total = mysql_num_rows($query);
Then to display the total, simply:
echo 'There is a total of ' . $total . ' records in the table.';
or
echo $table;