cakephp/cakephp — pull request #1029 by dogmatic69 (2012-12-16 15:42:09+00:00)
Title: Wrapper for counting

Sometimes you need to do something based on the count of items but do not need
the data in them.

Instead of having to do `count(Hash::extract(...))` all over this is a simple wrapper
to do just that, eg:

switch(Hash::count($data, '{n}.Some.path')) {
case 10: echo $this->element('huge', $data); break;
case 5: echo $this->element('other', $data); break;
case 1: echo $this->element('single', $data); break;
default: echo 'No stuff';
}