What are the potential benefits and drawbacks of using sessions to prevent double counting in a PHP-based statistics system?

One potential benefit of using sessions to prevent double counting in a PHP-based statistics system is that it ensures accurate tracking of unique visitors. However, a drawback is that it may impact performance if there are a large number of visitors accessing the site simultaneously.

session_start();

if (!isset($_SESSION['visited'])) {
    $_SESSION['visited'] = true;
    
    // Code to increment the visit count in the statistics system
}