Electrum: "restoring" a wallet from a seed
Electrum uses a gap limit to stop looking for addresses in the deterministic wallet. The default gap limit is set to 20, so the client get all addresses until 20 unused addresses are found.

Change addresses have a gap limit of 3 and this is not modifiable by the user.