Profile views counter

Hi All,
I am putting up a rails site, which will have user profiles.
And I want to have a counter (or any other mechanism) to give the
number of times any profile is viewed.

Is there any easy and efficient way to achieve this?
With this info I want to even list the most viewed profiles.

Please suggest!
Thanks in advance.