How can I SELECT some data from one of my tables and then count how many rows are returned using CodeIgniter?
Have a look at the result functions here:
$this->db->from('yourtable');
[... more active record code ...]
$query = $this->db->get();
$rowcount = $query->num_rows();