#include <bits/stdc++.h>
using namespace std;
const int N = 10000;
int F, I, T, ans = 0;
int cnt[N];
char readchar() {
  char ch = getchar();
  while (ch != 'Y' && ch != 'N') ch = getchar();
  return ch;
}
int main() {
  memset(cnt, 0, sizeof cnt);
  cin >> F >> I >> T;
  for (int i = 1; i <= F; ++i) {
    for (int j = 1; j <= I; ++j)
      if (readchar() == 'Y') ++cnt[j];
  }
  for (int j = 1; j <= I; ++j)
    if (cnt[j] >= T) ++ans;
  cout << ans << endl;
  return 0;
}
