#include <bits/stdc++.h>
using namespace std;
int main() {
int numw, pwords;
pwords = 0;
cin >> numw;
for (int i = 1; i <= numw; i++)
{
string cword;
cin >> cword;
sort(cword.begin(), cword.end());
int len = cword.size();
/*cout << cword << "\n";*/
if (len % 2 == 0)
{
bool allpaired = true;
for (int j = 0; j < len; j += 2)
{
if (cword.at(j) != cword.at(j+1))
{
allpaired = false;
j = 99;
}
}
}
if (allpaired)
{
pwords++;
}
/*
for (int i = 0; i < cword.size(); i++)
{
char l = cword.at(i);
for (int j = 1; j < cword.size() - i; j++))
{
lcount = 1;
if (cword.at(i+j) == l)
{
}
}
}
*/
}
cout << pwords;
}