<?php
$config = new Yaf_Config_Simple([
'application' => ['name' => 'MyApp'],
'database' => ['host' => 'localhost'],
]);
// Only the top-level entries ("application" and "database") are counted
var_dump(count($config));
var_dump($config->count());
?>
The above example will output
something similar to: