While you have the party inventory window open, the counter that tracks how many items are in the party inventory doesn’t update. If you give items to brothers or put them back in the stash the counter stays the same. If you exit the inventory screen and then return the inventory count will be accurate. The counter updates correctly when buying, selling or looting items.
The screenshots attached show the party inventory window, one with the correct 52 items in it and counted correctly, one with more but still showing 52 items. You can confirm that count in the second screenshot is incorrect, as there are 6 full rows with 9 items each, which would be 54 items total.