Normally, any supervised ANN algorithm classifies data based on the number of samples. In the case where training samples = N then output classes (O) should be O
The number of classes is related to the task that you try to solve and does not have any relation to the neural network. however, as for humans, more classes mean more complexity. in another word, a large number of classes require a more powerful neural network.