Phylogenetic Independent Contrasts with discrete traits
Assuming that by "discrete", you mean "discrete and ordinal" (like 2, 21, 7, 12) and not "discrete and nominal" (like red, blue, yellow, green), then it is really easy. It just mean you can just use your numbers. The contrast between lineage with average trait 6 and lineage with average trait 9, the contrast is therefore 3. 

If your data are nominal, then there is no way to calculate a contrast.

Not however, that typically you might violate assumptions of the PIC model. Make sure to know those assumptions and have a feel of whether you seem to respect them.