Sorry I just had to edit your post, since we dont appreciate first time posters that link direct to their page, in order to achieve clickthrough and promotion based on this sites popularity.
The thing you're requesting, is quite easy, have a way to store a current and old timestamp from your users last visit, if the current timestamp is, say more than 10 minuts from now, update the old timestamp to current timestamp and update current timestamp to now.
Then when someone looks for what they've missed since last visit, just match up agains every timestamp on everyother thing you have stored from the users old timestamp.
The ones who hasn't set old timestamp are first tiem viewers, and the count of users visiting from a given time to a given time kinda gives it self...
Here is a function where I do it..
PHP Code:
function last_seen($first_call=false)
{
global $DB_LINK, $USER_ID;
/* Check last seen */
if($res = mysql_query("SELECT profile FROM users WHERE id = \"$USER_ID\"", $DB_LINK))
if($urow=mysql_fetch_array($res))
if($res=mysql_query("SELECT last_seen, current_seen FROM profiles WHERE id = \"$urow[profile]\"", $DB_LINK))
if($row=mysql_fetch_array($res))
if($first_call && ($row[last_seen] +600) < $row[current_seen])
mysql_query("UPDATE profiles SET last_seen = \"$row[current_seen]\" WHERE id=\"$urow[profile]\"", $DB_LINK);
else
if(($row[current_seen] + 60) < time())
mysql_query("UPDATE profiles SET current_seen = \"".time()."\" WHERE id=\"$urow[profile]\"", $DB_LINK);
mysql_free_result($res);
}