#include <bits/stdc++.h>
using namespace std;
long o[233];
int main(void) {
  long f, i, t;
  cin >> f >> i >> t;
  for (long x = 0; x < f; ++x) {
    string s;
    cin >> s;
    for (long y = 0; y < i; ++y)
      if (s[y] == 'Y') o[y]++;
  }
  long ans = 0;
  for (long x = 0; x < i; ++x)
    if (o[x] >= t) ++ans;
  cout << ans << endl;
}
