found \N in my data does not count as missing values in r
The reason its shorws an error, bacause '\' is a part of base regex expressions in R.
As states here: 

The metacharacters in extended regular expressions are . \ | ( ) [ { ^ $ * + ?

So the comparisson like this

country$indepYear=='\N'


or this ( Its not a valid comparisson at all)

country$headOfState==\N 


will throw an error. You need to "escape" the "\" symbol. 
Try something like this instead if you want to replace "\N" with NA:

country$indepYear[country$indepYear=='\\N'] &lt;- NA


If you need just to count them, you can use this approach:

sum(country$indepYear=='\\N') 


Hope this helps.