The table name you are querying ( "read" ) is the same as the db field name?
Maybe try something like this and see what you get...
function messages() {
$query = mysql_query("SELECT * FROM messages WHERE read='no'") or die (mysql_error());
$result= mysql_query($query);
$count = mysql_num_rows($result);
if(mysql_num_rows($result) == 0){
echo("Nothing to Display!");
}else{
echo "$count results";
}