Implementation of the Category2Number node.