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