[eluser]OverZealous[/eluser]
Make 100% sure you are doing this: count($p->all) and not this: count($p). I just tested it to be sure, and the latter always returns 1.
I've got helpers all over, and have never seen anything like this. It just doesn't make sense, since $p->all is a normal PHP array, and count is an internal PHP function.
Is the Datamapper library getting loaded correctly before it is used in your helper? Are you sure that $p is a valid object?
Again, I just tested it, using almost exactly the same code. Works perfectly for me.