of: add functions to count number of elements in a property