Calculate unique values in ODK

Hi!

I am new to ODK and need some help on a calculation. I am doing a
questionnaire about agricultural production and harvest. My questionnaire
contains the following information/ questions:

  1. Pre-loaded information about each plot the household cultivated in the
    previous year and the crops that have been planted on it. The same crop may
    be planted several times on different plots. This information is recorded
    as calc_crop1_label, crop2_label etc.
  2. The household is then given the opportunity to correct the pre-loaded
    information and state for any given plot that either a different crop or no
    crop was planted.

Now I want to calculate the total number of distinct crops this hh has been
growing, taking into account the newly entered information.
For that, I first do a set of calculations to record the current crops
grown on each plot, using an if function. I record this information as
crop_label1, crop_label2, etc.
From this point on I am clueless how to proceed. What I basically want ODK
to do is another set of calculation to record crop1, crop2 etc, but only if
the crop has not been recorded before. Has anyone attempted to do something
similar before?

Thanks!