PHP Code: 
<?php

/**
 * @author Somik Khan
 * @copyright 2011
 */

// Enter the name of the file which the count is stored to
$filename "counter.txt";

// Get action from $_GET['type'] or $_POST['type'] variable
$action $_POST['type'];




// Load the file into $visit file
$visit file_get_contents($filename);
// Remove garbase data and only keep the integer value of visit
$visit intval($visit);


if(
$action == "increase"){
    
$visit++;
    
file_put_contents($filename,$visit);
}
elseif(
$action == "decrease"){
    
$visit--;
    
file_put_contents($filename,$visit);


echo 
$visit

?>

Usage:
Code: 
To increase: 
Go to: http://www.site.com/example.php?type=increase
OR post "type" with value "increase" to example.php

To decrease: 
Go to: http://www.site.com/example.php?type=decrease
OR post "type" with value "decrease" to example.php

To display, just add:
include("example.php");