added function to get the size of a player's inventory for all game engines