#include <bits/stdc++.h>
int M[11][11];
int main() {
  int F, I, T;
  scanf("%d%d%d", &F, &I, &T);
  char c;
  scanf("%c", &c);
  for (int i = 0; i < F; ++i) {
    for (int j = 0; j < I; ++j) {
      scanf("%c", &c);
      M[i][j] = c == 'Y' ? 1 : 0;
    }
    scanf("%c", &c);
  }
  int r = 0;
  int o;
  for (int i = 0; i < I; ++i) {
    o = 0;
    for (int j = 0; j < F; ++j) {
      o += M[j][i];
    }
    r += o >= T;
  }
  printf("%d", r);
}
