update company set lic_used = (select count(*) from contact where company = company.id and phone > 1) where status != 'deleted';
