Doctrine 1

Correct way to count all files from a table ?