select count(*) from contacts c, acs_objects o where c.contact_id = o.object_id ${search_clause} ${starts_with_clause}