def total_points(min_x, max_x, points_per_mz):
    """
    Calculate the number of points for the regular grid based on the full width at half maximum.

    :param min_x: the lowest m/z value
    :param max_x: the highest m/z value
    :param points_per_mz: number of points per fwhm
    :return: total number of points
    :rtype: int
    """
    if min_x > max_x:
        raise ValueError("min_x > max_x")
    if min(min_x, max_x, points_per_mz) <= 0:
        raise ValueError("all inputs must be greater than 0")
    return int((max_x - min_x) * points_per_mz) + 1