def hex_rect_size(rect_x, rect_y, rect_z, width, height, inc_bottom=False, inc_top=False):
    """Returns the number of hexes in a given rectangle.
    Equivalent to len(list(hex_rect(...)))"""
    odd_height = int(inc_bottom) + int(inc_top) - 1
    return height * width + odd_height * (width // 2)