#include <bits/stdc++.h>
using namespace std;
int n, items, threshold, res, total[10];
string s;
int main() {
  int a = 0, kitten = 0;
  a += kitten;
  scanf("%d%d%d", &n, &items, &threshold);
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int j = 0; j < items; j++)
      if (s[j] == 'Y') total[j]++;
  }
  for (int i = 0; i < items; i++)
    if (total[i] >= threshold) res++;
  cout << res;
}
