SplObjectStorage::count Returns the number of objects in the storage &reftitle.description; public intSplObjectStorage::count intmodeCOUNT_NORMAL Counts the number of objects in the storage. &reftitle.parameters; mode If the optional mode parameter is set to COUNT_RECURSIVE (or 1), SplObjectStorage::count will recursively count the storage. &reftitle.returnvalues; The number of objects in the storage. &reftitle.examples; <function>SplObjectStorage::count</function> example attach($o1); $s->attach($o2); $s->attach($o1); var_dump($s->count()); var_dump(count($s)); ?> ]]> &example.outputs.similar; &reftitle.seealso; SplObjectStorage::attach SplObjectStorage::detach