Device Counter

Samsung has a feature on their appliances that enable counters that track when supplies need to be reordered on amazon. For example, it can track the number of dishwasher pods that have been used. Is there a way to track “counters” like this on your own? For example, track the number of times an appliance has been used, or an event has occurred, so you can perform maintenance or resupply. A robot vacuum would make a good candidate for something like this so you can switch out sweeping pads.