acceed the parent in nested function

hi, how can i acceed the parent in nested function. ex: user.reviews.count i want to acceed user object in count function. I tried with scoped_methods but it doesn't work in this case. is there another, a better way?