Correctly get current number of modules