def count(val, iterable):
    """ 
    Counts how many times a value (val) occurs in an iterable, excluding `None`

    
    :param val: The value to be counted
    :param iterable: values to be counted over
    :type iterable: iterable  

    :return: the count of values
    :rtype: int
    """
    return sum(1 for x in (y for y in iterable if y is not None) if val == x)