Added comment describing how total number of states in calculated.