PHP: Cuente un objeto STDClass

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