#include <bits/stdc++.h>
int a[11];
int main() {
  int f, t, i;
  scanf("%d%d%d", &f, &i, &t);
  for (int x = 0; x < f; x++) {
    for (int y = 0; y < i; y++) {
      char ch = '\n';
      while (ch == '\n') scanf("%c", &ch);
      if (ch == 'Y') a[y]++;
    }
  }
  int res = 0;
  for (int x = 0; x < i; x++) {
    if (a[x] >= t) res++;
  }
  printf("%d", res);
  return 0;
}
