How do I restrict a user to visit a particular page only certain no of times?
If you want to restrict a casual user to only 5 views of ANY premium content, versus restricting his/her looking at the same piece of content 5 times, you might want to consider storing this information in the user's data field.

In broad strokes, you could in a custom module's nodeapi hook, do something like this:

if op is view
  if type is premium
    if user doesn't have a premium role assigned
      load the full user object
      if s/he has seen 5 pieces of content
        drupal_goto signup page
      else
        increment count of free page views
        save user
        if this is the 5th view
          tell user this is the last freebie
        fi
      fi
    fi
  fi
fi


Look into user_save() and user_load() for how to save and load serialized information into and from the data field/column of the user.  Also look into hook_nodeapi() for how to intercept these views.

Also caveats you will have to be aware of is cron and search, you probably don't want them to be limited by this, and that drupal_goto in there might/will reek havoc if it isn't trapped for these purposes.