Use the r
flag to get the negative sign in there:
function count_days($start_date, $end_date){
$d1 = new DateTime($start_date);
$d2 = new DateTime($end_date);
$difference = $d1->diff($d2);
return $difference->format('%r%a days');
}