#include <iostream>
#include <string>
using namespace std;

const int MAX_N = 100;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	string str;
	cin >> str;
	
	int ans = 0;
	for(int i = 0; i < n; ++i){
		string str2;
		cin >> str2;
		bool check = false;
		for(int j = 0; j < str2.size(); ++j){
			if(str[0] == str2[j]){
				for(int space = 1; space < str2.size(); ++space){
					int l = 1;
					for(int k = j + space; k < str2.size(); k += space){
						if(str[l] == str2[k]){
							++l;
						}
						else { break; }
						if(l == str.size()){
							check = true;
							break;
						}
					}
					if(check){ break; }
				}
			}
			if(check){ break; }
		}
		if(check){
			ans++;
		}
	}
	
	cout << ans << endl;
	
	return 0;
}