<?php
Class Counter {
  var $count = 0;

  function init() {
    $this -> count = 0;
  }

  function inc() {
    $this -> count++;
  }
}

session_name("asdfasdf");
session_start();

if (!isset($_SESSION[count])) {
  $_SESSION[count] = new Counter;
  $_SESSION[count] -> init();
} else {
  $_SESSION[count] -> inc();
}

print $_SESSION[count] -> count

?>