Something like this should work.
public function index()
{
$limit = 6;
$total_items = $this->mymodel_m->count_all();
$pagination = create_pagination('mymodule/page/', $total_rows , $limit, 3);
$items = $this->mymodel_m
->limit($pagination['limit'], $pagination['offset'])
->get_all();
...
}