Joint Learning of Set Cardinality and State Distribution