<?php
$rolenumber=$_SESSION["rolenumber"];
 $result_userstable = $dbh->query("select * from users where rolenumber='$rolenumber'");
    $row_userstable = $result_userstable->fetchObject();


$result_message=$dbh->query("select * from message where recepient='$rolenumber' and dateread=''");
                                    $row_message=$result_message->fetchObject();
                                    $count_message=$result_message->rowCount();

echo $count_message;
?>