AFAIK it was Epson who did it first (over 20 years ago now): https://news.ycombinator.com/item?id=25054177 (you'll need to read the article from the Internet archive, since it has unfortunately disappeared)
The chip is just an EEPROM. The printer presumably has a pretty accurate estimate given that it knows how many pixels were printed, and the volume of each one.
The chip is just an EEPROM. The printer presumably has a pretty accurate estimate given that it knows how many pixels were printed, and the volume of each one.