Counting models doesnt work

When trying to count some data using this way:

User::count(array('name' => 'Foo'));

It always returns the full range of users so I get x instead of 1.
For me its weird because I'm sure it worked.

edited Jul '15

Where type : User::count("name = 'Foo' ");

edited Jul '15

Hmm, could work but I'll need some protection against SQL-Injection.

It works now using a similar method like this, but I still would use my way.. when it works.

$count = User::count(array(
    'name > ?0'
    'bind' => array('Foo')

Hmm, guess I'm not the only one trying to use associative arrays as condition :]