[eluser]Maglok[/eluser]
Well going from your getComments you know the $postid. So make a new function in the model like about so:
Code:
function countComments($postid) {
$this->db->from('comments');
$this->db->where('post_id', $postid);
return $this->db->count_all_results();
}
You effectively query the comments from a post and count them. Count is also a rather 'cheap' SQL function.