if you look at the code after that
```
$count_query = clone $posts_query;
                $total_records = (int) $count_query
                        ->select(array(DB::expr('COUNT(DISTINCT `post`.`id`)'), 'records_found'))
                        ->limit(NULL)
                        ->offset(NULL)
                        ->find_all()
                        ->get('records_found');
                $count_query_sql = $count_query->last_query();

                // Get posts
                $posts = $posts_query->find_all();
                $post_query_sql = $posts_query->last_query();
```

We have to mess with the fields being selected for the count query.. so we can't use the same object.
We clone it because we want all the same where clauses, but not the limit, offset, select parts of the query.