Can i force to subtract the paginate query count?

I am using CakePHP 2.5 and need to remove some results from the query based on an criteria:

$this->paginate = $paginate; $results = $this->paginate('services'); foreach($results as $key=>$data ) { if( empty( $dado['services']['service_id'] ) ) { unset($results[$key]); }

The result count will keep the original count.

Is there a way to subtract, the paginate query count, when i do unset the query results?

Looking at the Paginator class can not see if there is a property with the result count information.

Unsetting items from the result seems not like a good idea to me.
You should set the conditions while paginating, not after.
Something like:

$paginate = [
    'conditions' => [
        'NOT' => ['service_id' => null]
    ]
]

Docs: http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html#query-setup

Working now, thank you for pointing the right aproach.