add variable count to function randomly_get_bipartition to avoid endless while-loop