[CRM] Migrate to new API

- Task: https://www.odoo.com/web#id=10543&view_type=form&model=project.task&action=333&active_id=248
- Pad: https://pad.odoo.com/p/r.qE00VdREVpboKWJp
use self.env and search_count in the new API