<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nFreeParams(self):
 """Count the number of free parameters in the active model."""

        nF = 0
        pars = self.params()
        for par in pars:
            if par.isFree():
                nF += 1
        return nF