#include <bits/stdc++.h>
using namespace std;
string m[500];
int F, I, T, i, j, ans;
int main() {
  cin >> F >> I >> T;
  for (i = 0; i < F; ++i) cin >> m[i];
  for (i = 0; i < I; ++i) {
    int cnt = 0;
    for (j = 0; j < F; ++j) cnt += m[j][i] == 'Y';
    ans += T <= cnt;
  }
  cout << ans;
}
