Adding query method to models, implementing count for models