fix ObjectSet::count()