Indefinitely. The pacemaker is a very reliable way to maintain a normal heart rate. The device and the wires that connect it to the heart do require replacement infrequently. With appropriate follow up these procedures are electively planned and do not entail a high risk.
No limit. If they keep replacing the units when the battery is low it will not limit life expectancy.