I've always just updated the capacity to however many are there, reasearched it, then removed any overstock and update the capacity again if necessary. I'm not actually sure if that's the correct way to do it though. But the way I look at it is if there are 5 there, only 4 really fit properly, and the capacity is 4, researching it as 4 will incorrectly update the on-hands, since it isn't counting the overstock that you just took off the shelf.