How many of those slots came from your horse and how many came from your bag? If you upgraded your horse to have 50 slots that puts your bag at 60 and your horse at 50 meaning if you switch horses you'd be back down to 60 slots.
Your items are first filled into your character bags. After that they are filled into your horse bags.
If your horse is holding any items, you cannot switch it out unless the other horse already have enough bag space to hold what is needed.
I don't understand how this works. I have 110 slots and 82 were filled and 28 were empty but I couldn't change horses and I don't understand why not.
Each time you feed your horse oats, your carrying capacity goes up one. If you purchased a horse with extra capacity (draft horse), then you get an extra 10 spots.
It sounds like you have a draft horse you fed 20 oats, or another horse you fed 30 oats. That carrying capacity is linked to that horse. If you change the horse, you lose that capacity.