Added count() method to the model