Well, apparently you can use the a dogmeat duplication glitch on stacked items. You have him grab the stack and when he drops it, it is one item. But, if you drop the stack again his item mirrors the stack quantity. You can do this over and over with the original stack with his bouncing between 1 and the quantity of the original stack as you continually pick up and drop it. If you pick up hisome stack, even when it says whatever the quantity it should be, it goes into your inventory as one item.
Now, the way to "set" the stack has been to quicksave, quit, then load the save. However when producing multiple stacks as I addressed, some of them disappear, sometimes all of them do, for certain items, such as glass; even after the quicksand which should set it.
So, instead of going through the process of the quicksave, quit, reload process....go into workshop mode and scrap the materials that dogmeat dropped (while you have the original stack on the ground), and they will go into the workshop as the quantity of the original stack. I'm not sure if this works for ammo and storing it in the workshop, because while I am okay with cheating for building materials, somehow I don't feel right about doing it for ammo or weapons, but I'm sure it probably works for that too.