update pi count when delivery is updated