I am by no means an expert in PHP but try cleaning up your code some, this is what it should look like (I have not tested it).
Code:
<?php
//Connect To Database
$hostname = 'xxxxxxxxxx';
$username = 'xxxxxxxxxx';
$password = 'xxxxxxxxxx';
$dbname = 'xxxxxxxxxx';
mysql_connect('$hostname','$username','$password') OR DIE ('Unable to connect to database! Please try again later.');
mysql_select_db($dbname);
$query = 'SELECT count(response) FROM answers1";
//I also tried $query="count(*) FROM answers1";
$total = 'mysql_query($query)';
echo '</br>';
echo '</br>';
echo $total;
?>
Alex