Code to count the number of entity of each type in the relational
datums in the training data