Anvil outputs only 1 item when renaming
The bug
When renaming more than 1 item in an anvil in survival, the output will always be 1.

Code analysis
In 1.11.2, net.minecraft.inventory.ContainerRepair.updateRepairOutput() sets the output to 1 if the item is not a name tag.
ItemStack itemstack1 = itemstack.copy();
if (itemstack1.getCount() > 1 && !this.player.capabilities.isCreativeMode && !(itemstack1.getItem() instanceof ItemNameTag))
{
itemstack1.setCount(1);
}