'Creates a new count vector.
:param name:       The name of the variable in the original code.
:param category:   The category of the variable.
:param conditions: The counting conditions as list of function objects,
each shall return true when getting data indicating
that this occurrence should be counted.
:param weightings: Optional factors to weight counting conditions.
Defaults to 1 for all conditions.'

def __init__(self, name, category=None, conditions=None, weightings=None):

    self.name = name
    self.category = category
    self.conditions = (conditions if (conditions is not None) else [])
    self.count_vector = [0 for elem in self.conditions]
    self.unweighted = [0 for elem in self.conditions]
    self.weightings = weightings
    if (self.weightings is None):
        self.weightings = [1 for elem in self.conditions]
    assert (len(self.count_vector) is len(self.weightings))
