Renamed local variable in countTerms()