ok finally got it if anyone is intersted I'll put the code here...

totalhits.php
Code:
 <?php
$myfile = "totalhits.txt";
//Assigns file name to the variable we'll use to handle it
if(file_exists($myfile))//if the file exists
    {                    // runs counter script
    $var = fopen( $myfile,'r+');
    //opens in read and write mode for file
    $visits = fread($var,filesize($myfile));
    //puts the content of the file for its whole length
    rewind( $var );
    //resets the file position indicator to the beginning
    $visits++; //increments the actual number of vists by 1
    fwrite($var, $visits);
    //writes on the variable the actual (incremented) value
    fclose($var);//closes our file reference
    }
else
    {
        print "File $myfile doesn't exist...";
        Die();
//if the file doesn't exist prompts a warning and kills the script        
    }
$message = sprintf("Total Hits: %s",$visits);
//saves our visits message in a variable ($message) that will be used as output
print $message;
?> 
Code in index.php
Code:
<?php include 'totalhits.php'; ?>
only question I have is permissions... The txtfile has to be 777, thats the only way it will work... is that correct? Wait... I can use .inc......
_________________________
"The secret to creativity is knowing how to hide your sources."
-Albert Einstein

Tech Ninja Security