For Example, I want to know the User have how many post. So, I do it in this way;
user.posts.length
It works, but when I see the server log, it shows me that:
SELECT * FROM "posts" WHERE ("posts".user_id = 6)
actually, I need to know the post number only, how can I do this? Thank you.