“Number of classes” is defined by the number of different target classes in your multi-class classification use case.
E.g. you could use a neural network in order to classify an input image into 3 different classes: cat, dog, bird. In this case the number of classes would be 3 and the target tensor should thus contain values in: [0, 1, 2], where each integer represents a specific class.