Proof:
A stack of 40 gold ores (i got this high just by adding gold ores to a regular stack of 20)

A stack of 9 gold ores

==> Total: 49 gold ores.
Now when i added these 2 stacks they split and i ended up with the following
A stack of 20

A stack of 20

A stack of 10

==>Total: 50 gold ores.
I assume this is possible with all stacked items.