alter table company add column lic_used integer NOT NULL default '0';
update company set lic_used = (select count(*) from contact where company = company.id and phone > 1) where status != 'deleted';

