# How to count categorization instances in a NN?

Say one-hot encoding is the perfect way to represent a series of objects such as clothing items. Ie: A hat is [1 0 0], a tie is [0 1 0].

I want to predict what a customer buys if they spend a certain amount of money, which will serve as an input to the NN. Eg: For one example, the customer spends $22. The thing is, the customer may buy multiples of the same clothing item. What would be the best way to make the neural network output something like [2 1 0] to show its prediction as 2 hats and 1 tie, given the input of$22?

As far as I understand binary crossentropy is good for multilabel problems, but nowhere could I find an example of how I could apply this when the same label occurs more than once.

The only solution I could think of was turning this into a regression problem, but doing so would seem bad since this is a categorical problem, and the network should output fixed natural numbers depending upon the number of times an object is predicted.