public void handle(Directory directory, Metadata metadata) throws MetadataException {
            if (directory.containsTag(ExifDirectoryBase.TAG_PAGE_NUMBER)) {
                int[] pageNums = directory.getIntArray(ExifDirectoryBase.TAG_PAGE_NUMBER);
                //pages can be in any order, take the max
                if (pageNums != null && pageNums.length > 1) {
                    Integer curr = metadata.getInt(TIFF.EXIF_PAGE_COUNT);
                    if (curr == null || curr < pageNums[1]) {
                        metadata.set(TIFF.EXIF_PAGE_COUNT, pageNums[1]);
                    }
                }
            }
        }
Copies all fields regardless of directory, if the tag name
is not identical to a known Metadata field name.
This leads to more predictable behavior than {@link CopyAllFieldsHandler}.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-image-module/src/main/java/org/apache/tika/parser/image/ImageMetadataExtractor.java