There might be an easier way, but this should work...
if(mysql_num_rows(mysql_query("select word from tableName where word='$word'"))) {
mysql_query("update tableName set hits=hits+1 where word='$word'") or die (mysql_error());
}
else {
mysql_query("insert into tableName (word,hits) values ('$word',1)") or die (mysql_error());
}