No, there's no built-in function. You can, however, do as werkkrew said, and use a file:
// Read the file
if (file_exists("count")) {
$cfile = fopen("count","r");
$count = fread($cfile, filesize("count"));
fclose($cfile);
} else {
$count = 0;
}
// Write to the file
$count = $count + 1;
$cfile = fopen("count","w");
fputs($cfile,$count);
fclose($cfile);
This will create the file if it doesn't exist.