Вот решение sqldf:
textFile <- "Country_Region
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua and Barbuda Argentina
Armenia
Australia
Australia"
data <- read.csv(text = textFile,stringsAsFactors = FALSE)
library(sqldf)
sqldf("select count(distinct Country_Region) from data")
... и результат:
> sqldf("select count(distinct Country_Region) from data")
count(distinct Country_Region)
1 8
>