Aquí tienes:-
$query = $this->db->query('SELECT city, COUNT(city) AS jobcount FROM `jobs` GROUP BY city ORDER BY jobcount DESC');
if ($query->num_rows() > 0)
foreach ($query->result() as $row)
$data[] = array(
'total' => $row->jobcount,
'city' => $row->city
);
return $data;
No olvides intercambiar 'jobs'
con el nombre de tu mesa