Hook for contact view
With contact view, I guess you mean when a contact summary page for a specific id is loaded you want me to increment a count number and store it in DB to display it in the report.
Currently, there is no such feature in core civicrm. You need to add a custom extension to add this functionality. See more details to build a simple ext at https://docs.civicrm.org/dev/en/latest/extensions/civix/. Some basic steps would be -

Add a custom field to extend Contact eg View Count.

Use hook_civicrm_summary to increment the value of this field for a specific contact ID.

You can use this custom field to show on any report provided by civicrm.