/* Function is used to determine the number of device path instances that exist in a device path. */
UINTN EfiDevicePathInstanceCount(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
/* Function is used to determine the number of device path instances that exist in a device path. */
UINTN EfiDevicePathInstanceCount(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
{
  UINTN  Count;
  UINTN  Size;
  Count = 0;
  while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {
    Count += 1;
  }
  return Count;
}