It should work with any number of classes, as long as the target indices match your model output.
Note that the indices start from 0 and go to (number_of_classes - 1).
If you have 70 classes, your target should contain values in [0, 69].