如何查询多个变量以在Codeigniter中的视图中显示

I have my little project coding with Codeigniter, I am just stuck in querying the total count of specific column to show in a View. Here are some pieces of my code where I get stuck:

Model:

function get_dailyprob()
{
    $date = date('d-m-Y');
    $q1 = $this->db->select('client')->like('created_at', $date)->group_by('client')->get('histprob')->result();
    $q2 = $this->db->like('created_at', $date)->count_all_results('histprob'); //HERE I HAVE NO IDEA HOW TO GET A TOTAL COUNT OF EACH ROWS THAT ALREADY GROUPED BY COLUMN client
    return array('dp_client' => $q1, 'dp_count' => $q2);
}

Controller:

$data['dailyprobs'] = $this->skejuler_m->get_dailyprob();

View:

<table class="table table-hover">
<?php if ($dailyprobs['dp_count'] > 0) {
foreach ($dailyprobs['dp_client'] as $dpc): ?>
<tr>
<td><?php echo $dpc->client; ?></td>
<td><span style="font-size:16px" class="badge bg-red"><?php echo $dailyprobs['dp_count']; ?></span></td>
</tr>
<?php endforeach; ?>
<tr><td><?php } else { echo 'No Issues!'; } ?></td></tr>
</table>
  1. $dpc->client results some rows and each row has different count (filtered by query in Model)
  2. $dailyprobs['dp_count'] is currently showing the whole results, whereas I need showing a total count grouped by client

Current Result

Sorry if the explanation was confusing. I just added an image of View. As shown in the picture, both American Standard / Grohe & App Sinarmas have each 2 in total number = 4, whereas the actual total row is 1 of each column (client) = 2. I am sorry for my English.

It just solved by changing the query in Model:

function get_dailyprob()
{
    $date = date('d-m-Y');
    $query = $this->db->select('*, COUNT(*) as cnt')->like('created_at', $date)->group_by('client')->get('histprob');
    return $query->result();
}

Then use foreach in View to get Count and Rows Result.