PHP: Policz obiekt STDCLASS

$total = count((array)$obj);
Black Badger