import glob


def count_images(publication, file_number):
    """Return the number of scans in the directory."""
    format_string = 'static/img/scans/{}/{:>03}/*'
    glob_string = format_string.format(publication, file_number)
    image_paths = glob.glob(glob_string)
    return len(image_paths)