Most of them don't. They store the ink level in the chip (100%). As the ink gets used, the computer updates the chip with the amount left by subtracting about what it thinks was used.
There have been all sorts of software mechanisms (and lawsuits about them) to prevent someone from updating the chip to reflect filling the ink well.
HP used a different mechanism, I don't know what they use now. They had a chip permanently programed with the serial number of the cartridge and the printer kept track of them. It could only hold 3 in memory, so if you had 4 cartridges, or used tape to change the reading of the serial number (blocking contacts), you could reset it.
Geoffrey S. Mendelson, Jerusalem, Israel firstname.lastname@example.org N3OWJ/4X1GM