def get_z_plane_count(img_el):
    """returns the number of planes in the z-stack for an image given the image element"""
    count_string = img_el.findall(
        '{http://www.openmicroscopy.org/Schemas/OME/2016-06}Pixels[@SizeZ]')[0
        ].attrib['SizeZ']
    return int(count_string)
