At first I thought it was item based, but that didn't seem to pan out over game play...
On some occasions when dragging an item stack to a vendor sell window the count starts at 1, on others the count starts at the max number of items.
I did notice this on the same 'session' with a mix of tree harvestable items and it seemed to vary around the play session with other items like spices and such.