Multiplayer friendly scoreboard inventory

For a roguelike/lite map: Current Idea: Whenever you pick up an item it gets /clear 'ed and /scoreboard players add player1Items 1 (All items stack) Any ideas on how to optimise this so it works for multiple people having different "inventories" without creating 10 scoreboards and keeping track of which player owns a scoreboard?

Doesn't need to be a command just a general idea that I can /execute

Continue to help post