What i'd do is not to link directly to the file, but link to a php page that can count how many people have downloaded that file then forward them. I think this is how most people would do it.
Change
<a href="/Media/Test.rm">Download file</a>
to <a href="download.php?file_id=1&dir=/Media/Test.rm">Download File</a>
Then on download.php, you could use a mysql database with a field called file_id on each record. Each record then has a value assigned to it in the file_id category, such as 1, 2 etc for example.
<?
// connect to database
// Connect to MySQL Server
@mysql_connect($server, $username, $password) or DIE("Couldn't Connect to MySQL Database");
// Select Database
@mysql_select_db($database) or DIE("Couldn't Select Database");
$q2 = "select * from $table where file_id = '$file_id'";
$res2 = mysql_query($q2) or die(mysql_error());
extract(mysql_fetch_array($res2));
// Add 1 to the original total
$new_total = $file_total + 1;
// update the table
$q1 = "update $table set file_total = '$new_total' where file_id = '$file_id'";
mysql_query($q1) or die(mysql_error());
// redirect them to the file
<meta http-equiv="REFRESH" content="0; url=<?print $dir;?>">
?>
That should get you started.