code: public static Integer getPartCount(GetObjectRequest getObjectRequest, AmazonS3 s3) {
          ValidationUtils.assertNotNull(s3, "S3 client");
          ValidationUtils.assertNotNull(getObjectRequest, "GetObjectRequest");
  
          GetObjectMetadataRequest getObjectMetadataRequest = RequestCopyUtils.createGetObjectMetadataRequestFrom(getObjectRequest)
                  .withPartNumber(1);
  
          return s3.getObjectMetadata(getObjectMetadataRequest).getPartCount();
      }
docs: Returns the part count of the object represented by the getObjectRequest.
  
  @param getObjectRequest
  The request to check.
  @param s3
  The Amazon s3 client.
  
  @return  The number of parts in the object if it is multipart object, otherwise returns null.