Classes of data are basically the number of phenotypes or the number of data sets you have.
Like, for example if your experiment is the difference between the reaction time of females and males, the number of classes of data is 2. So the degrees of freedom, in this case, would be one.
If you took purple strems, cut leaves: purple stems,potato leaves: green stems,cut leaves: green stems,potato leaves( like you would for a dihybrid cross), then there are four classes of data. So the degrees of freedom is 3. =)