I used to use this following mapping which used to work in 2.3.0. It basically transform a list of items into an int which is a count of those items :