small code fix in the count method of models