Вы можете разделить абзацы по их разделителю и суммировать условную проверку:
df <- structure(list(words = c("CDjointdisease state glasses CDdiabetes eyesight",
"accidents_combined docvisits4w citysize CDliverdisease CDosteoporosis"
)), .Names = c("words"), row.names = 1:2, class = "data.frame")
> df
words
1 CDjointdisease state glasses CDdiabetes eyesight
2 accidents_combined docvisits4w citysize CDliverdisease CDosteoporosis
df$count <- sapply(strsplit(df$words, " "), function(x){
sum(x == "eyesight")
})
> df
words count
1 CDjointdisease state glasses CDdiabetes eyesight 1
2 accidents_combined docvisits4w citysize CDliverdisease CDosteoporosis 0