<?php
//Session Start
session_start();

//Ajax Init
include "ajax-init.php";

//countryCode like '$_SESSION['userCountry']%' AND

$q = mysqli_query($dbc,"SELECT count(id) AS Num, DATE(created_at) AS Day FROM customer_tbl WHERE countryCode LIKE '$_SESSION[userCountry]%' AND DATE(created_at) >= DATE(NOW() - INTERVAL 10 DAY )  GROUP BY DATE(created_at)");

$data = array();

while ($row = mysqli_fetch_assoc($q)){
    $data[] = $row;
}

echo json_encode($data);