select count(*) from tracking_motherbasicinfo where id_patient in (select id from patient where linked_to_id_patient=0 );