I must be staring at my monitor too long that I didn't catch a mistake with your query. Instead of this:
$result = mysql_query("SELECT * FROM user_country WHERE country_name, country_count=" .$country_name);
try this:
$sql = "SELECT *
FROM user_country
WHERE country_name = '$country_name'";
$result = mysql_query($sql, $link_id)
or die("Problem with query: ".mysql_error());
If you want to use country_count in your query, you need to specify a quantity (as I do not know what it should be) and use AND:
SELECT * FROM user_country WHERE country_name = '$country_name' AND country_count= '10';
Regarding your while loop:
while($row = mysql_fetch_row($result))
echo $row[0];
echo $row[1];
echo ("updated country counter by one<br>");
echo ("$country_name<br>");
echo ("$country_count<br>");
exit;
... only the first echo statement will be repeated while the boolean is TRUE in your while loop. You can use curly braces { } if you had wanted more than one line to repeat for as long as the while statement was true.
Also, the following is not correct:
$sql = mysql_query("INSERT into user_country (country_name, country_count) VALUES ('$country_name', '$country_count');");
$result = mysql_query($sql) or die('Error :' . mysql_error().'<br>'.$sql);
Try changing it to this:
$sql = "INSERT into user_country (country_name, country_count) VALUES ('$country_name', '$country_count')";
$result = mysql_query($sql) or die('Error :' . mysql_error().'<br>'.$sql);
Notice that I removed the function mysql_query in the $sql statement. It is not needed since you are creating a variable called $result to hold the results of you mysql_query function. Also, notice that I took out the semicolon ( ; ) from within the INSERT statement. It needs to come after the closing quote.
Again, my usual disclaimer: I did not look too deep at your code nor did I test it... so if this still doesn't work, let me know. But before that, understand why I made changes and see if similar problems exist elsewhere in this script or in your other scripts.