Changed findVariables so it only does a count