Count number of variables in methods for firm graph creation