Ya that would work, maybe a table of the form
item_counts = { <itemid> = { name = "Broadsword" , count = 194 , value = 12 }, ... }
and have a global event to count all the items, update the table, update all npcs sellables
This could allow all npcs to sell all items too.
Problem now is...