3
           
            
                
     
    
    sFiles is short for "storyFiles" i.e. it has nothing to do with the story counter.
Also, you have a $xoopsUser object to work with to identify users, hacking to compare IP's etc. is not needed.
Instead work with article.php and fin this:
 if (empty($_GET['com_id']) && $storypage == 0) { 
    $article->updateCounter(); 
}  
and modify it to this:
 if (empty($_GET['com_id']) && $storypage == 0) { 
    if (!$xoopsUser || $xoopsUser->getVar('uid') != $article->uid() ) { 
        $article->updateCounter(); 
    } 
}