Chest counting

I want to farm ten billion potatoes in survival. I’m going to have ten storage units with 108 double chests of shulkers of potatoes. I need a data pack that counts the potatoes in each unit and adds a scoreboard that goes like

Unit 1: X potatoes Unit 2: X potatoes And so on. How can I do this?

Continue to help post