If you have n
number of nodes and you want the anonymous user to able to see any three nodes out of these, then that is not possible, though you can use IP details or Cookies to track, it is not reliable, the user can always find a way to see other nodes too.
Simply, it is not possible to keep track of anonymous user.
Rather you can make three nodes to be publicly visible using node access settings, and remaining nodes to be seen only by authenticated persons. But all anonymous users can see the same three nodes.
Update : I am not aware of any modules which can provide this functionality, but you can write a custom module and restrict the user based on IP details or Cookie, though the user can easily find a way to see other nodes.
Write a custom module, create a schema with two columns IP address, count.
Implement hook_node_view()
and check $view_mode=='full'
and insert/update record to your custom table.
Implement hook_node_access()
, query your custom table to see the count for this IP, If the count is three then deny access.
Similarly you can use cookies instead of custom table, or you can use both cookies & custom table.