Something strange is happening as I have an empty table but I am not getting what I expect displayed on the page.

As Conformation I have run this and I get number = 0 which is what I expect.
PHP Code:
$sql "SELECT COUNT(show) FROM shows WHERE on_year = $current_year"
$result $PDO->prepare($sql); 
$result->execute(); 
$number_of_rows $result->fetchColumn();
echo 
"<br/>number = $number_of_rows<br/>"
When I run this code I expect "I'm sorry, there seems to be a problem." but I get "2013"
PHP Code:
if ( $stmt $PDO->query("SELECT COUNT(show) FROM shows WHERE on_year = $current_year ") ){
echo 
"$current_year";
}
else { echo 
"<p>Toylander will be attending some shows in $current_year.<br>Dates to be confirmed</p>"; }

The only way I can get what I want is by using:
PHP Code:
if ( ($stmt $PDO->query("SELECT COUNT(show) FROM shows WHERE on_year = $current_year ")) >= ){
echo 
"$current_year";
}
else { echo 
"<p>Toylander will be attending some shows in $current_year.<br>Dates to be confirmed</p>"; }

Obviously I am doing something wrong; can somebody let me know what it is!

Out of interest the same thing was happening when I was using Mysql statements.