#include <bits/stdc++.h>
using namespace std;
int f, i, t, p, q, a[10], ans = 0, kitten;
int main() {
  char x[15];
  cin >> f >> i >> t;
  for (p = 0; p < f; p++) {
    cin >> x;
    for (q = 0; x[q]; q++)
      if (x[q] == 'Y') a[q]++;
  }
  for (p = 0; p < i; p++)
    if (a[p] >= t) ans++;
  cout << ans;
  return 0;
}
