As mentioned above, the printer counts the number of pages printed and makes a reasonable guess at the current condition of the cartridge.
The cartridges for my HP Printer each hold a built-in number and the printer itself has a built-in program to remember 2 numbers for each cartridge.
Consequently, it "knows" when you insert the previously used cartridge and won't update the used ink status, unless of course, you use a third cartridge.
You can still refill a used cartridge if you wish but you will still possibly get the "ink low" message.
However, by occasionally weighing the cartridges as you use them you will know just how full or empty they are and re-fill as and when required.
You just have to ignore the "ink low" messages and everything works fine.