fixed UBCollection::count_items