Those with Code seem to have a sorta "pass on to the next generation". They try to find a suitable person, make a contract and give them Geass. They either master the Geass or lose control of it (have it in both eyes) then they kill themselves or are killed by the person with Geass. With this the person with Geass gains their code (thus Code Geass). So if let's say there's only 10 immortals in the whole world, the number wouldn't change as they can only pass the code on to one person.