We determine the factorial growth rate of the number of finite-index subgroups of right-angled Artin groups as a function of the index. This turns out to depend solely on the independence number of the defining graph. We also make a conjecture for right-angled Coxeter groups and prove that it holds in a limited setting.