use SplStack::count()