#include <bits/stdc++.h>
int main() {
  int F, I, T, c, i, j;
  scanf("%d %d %d", &F, &I, &T);
  int co[I];
  for (i = 0; i < I; i++) co[i] = 0;
  c = 0;
  for (i = 0; i < F; i++) {
    char line[I];
    scanf("%s", &line);
    for (j = 0; j < I; j++) {
      if (line[j] == 'Y') {
        co[j]++;
      }
    }
  }
  for (i = 0; i < I; i++) {
    if (co[i] >= T) c++;
  }
  printf("%d\n", c);
}
