added __len__ special functions to Genotype and Network