get cartridge counts from db