Even leaving the site completely, unless you've closed your browser or clicked on another topic before returning to that same topic, your session is still going to track your last visited topic, so it's not going to count it.
It's a modification necessary to get it to count every click on a topic. Normally we don't post modifications here, only on ubbdev, but since it's a quick little change, I'll go ahead.
Around line 411 of showflat.inc.php, you'll see this:
if ($_SESSION['current_topic'] != $topic_info['TOPIC_ID']) {
$query = "
insert into {$config['TABLE_PREFIX']}TOPIC_VIEWS
(TOPIC_ID)
values
( ? )
";
$dbh -> do_placeholder_query($query,array($topic_info['TOPIC_ID']),__LINE__,__FILE__);
$_SESSION['current_topic'] = $topic_info['TOPIC_ID'];
}
Change that, to this:
$query = "
insert into {$config['TABLE_PREFIX']}TOPIC_VIEWS
(TOPIC_ID)
values
( ? )
";
$dbh -> do_placeholder_query($query,array($topic_info['TOPIC_ID']),__LINE__,__FILE__);
$_SESSION['current_topic'] = $topic_info['TOPIC_ID'];
You're just commenting out the conditional, so it's always going to update the topic instead. And remember, that topic views won't update until a new post is made somewhere on the forum.