Prompt registration based on number of free articles read When an anonymous user reads 3 free articles, the system should prompt them that they have reach the limit of free articles, and they now need to register to read more.
How can i achieve this. I have just started writing modules. Any help would be beneficial. Thanks in advance
It seems you're looking for the Node Access module


  Nodeaccess is a Drupal access control module which provides view, edit and delete access to nodes. Users with the 'grant node permissions' permission will have a grant tab on node pages which allows them to grant access to that node by user or role. Administrators can set default access controls per content type, and also define which roles are available to grant permissions to on the node grants tab.


Image from module page