Try this to retrieve the ratings count with starts. It will display based on your css style.
If you user stars with css background u can this line like this
$ratings = (@round($rs[total_value] / $rs[total_votes],1)) * 20;
I hove it will helpfull.
// Query to retrieve rating per game or article
$query = "SELECT idGames FROM jogos";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$id = $row['idGames'];
$sql = "SELECT total_votes, total_value FROM $rating_tableName WHERE idGames=$id";
$results = mysql_query($sql);
$rs = mysql_fetch_array($results);
// set clss of star
$ratings = (@round($rs[total_value] / $rs[total_votes],1));
<div class="product">
<div id="rating_' . $id . '" class="ratings">
$class = "star_" . $ratings . " ratings_stars ratings_blank";//stars with css style
<div class="' . $class . '"></div>
Rating: <strong> $ratings / 5 </strong> // shows count out of 5
</div>
}