Bunu deneyin hocam;

$sql = $db->query("SELECT SUM(gosterim) as 'gosterim' FROM yazilar");
$gostr = $sql->rowCount();
echo $gostr["gosterim"];
?>