getSingleVarCount() modified