I would suggest updating the counter on each view. As @amon suggested - that hard part is determining WHEN to update the counter.
An old adage - no premature optimization before its time. Meaning- don't write complicated code for a problem you don't have yet.
You & others asked whether this is a performance issue - and I'll counter by asking -- Why would it be? Do you have evidence that makes you worry?
You can and should Model this quickly using napkin math - how many people do you realistically expect on your site per day - break that down to per hour or per minute. Do you expect 1 million? or 1,000? or 100?
Gather your existing web log stats to help model this (if available). And if this is an internal website for a company -- the total employee count is the largest you need to worry about.
Break the yearly down to an hourly stat (and there may be 5 days in a week if you expect access only on Business days). Use the fraction New vs Repeat users - multiply by the hourly page view stat to determine how often the counter is updating. Play with the number -- start with 70/30 (Repeat/New). Guess if you can't find good stats from your product manager. What if it is 1/99 or 99/1? Is that a concerning result?
I have found that the numbers tend to be much smaller than initially imagined - and you'll see that a computer can easily handle it.
Just write the code in a way that you can insert/refactor should you have a problem. There are lots of patterns out there.
For example: https://docs.microsoft.com/en-us/azure/architecture/patterns/