public int size() {
        int count = 0;
        for (Entry<K, V> bucket : this.buckets) {
            for (; bucket != null; bucket = bucket.next) {
                count++;
            }
        }

        return count;
    }
for concurrent IdentityHashMap

@author wenshao[szujobs@hotmail.com]
src/main/java/com/alibaba/fastjson/util/IdentityHashMap.java