i have created two tables. one episode table and one season table and i wanna know how can i select and display episodes counts for each season or save them in season.episodes_count what is the right way or query for doing this?
try {
    $stmt = $db->prepare("SELECT * FROM `season` WHERE season.show_id = '" . $show_id . "' ORDER BY season_number DESC");
    // how to select episodes_count?
    $stmt->execute();
    $seasons = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
    echo $e;
}


 
    