Keep track of the number of variables involved in the categoricals.