How to add a counter about the total number of nodes visited by a user? I have one block that display individual user details. 

How can I add a counter which counts the total number of nodes visited by a user?
Have you checked the Node view count module: Node View Count module allows to count node views. 


  Unlike statistics module, this module records each view of node with
  user uid and timestamp. 


I guess at max. you only would have need to write the correct database query to get the count of total number of nodes visited by a user as rest of the things are being done by this module.