The bot usually recognises stackable items as one. It sees that you have 362 hp pot, 251 mp pot, and 780 arrow, not as 7,5 stack, etc. So then if you have set the bot to buy 500 hp/mp pot and 1000 arrow, it will buy 138 hp, 249 mp pot and 220 arrow - if it is working well, of course. :)