adds extra argument to cardinality so that it can now return cardinality of specific variable or a list of variables. Earlier returned a dict of cardinality of all variables