Question: I have list given by: 

```
  d=
    {{{1,2},{1,1},{2,3}},
    {{1,4},{3,3},{2,1}},
    {{1,1},{3,1},{3,3}}}

```

Each row in the list is a different generation of the list. I'm trying to figure out how to look at each iteration and see if any of the elements in each sublist are the same number, e.g. in generation "1" the middle sublist would fit this criteria since it's `{1,1}`. I have an If statement that finds out this information for a singular row:

```
m = 1;
tt=Table[
  If[
   d[[m, l]][[1]] == d[[m, l]][[2]],
   Print["Same"],
   Print["Different"]],
  {l, 1, Length[d[[1]]]}];

```

I would like to loop the "If" statement above so that it looks at all generations not just generation 1 in list "d." I then want to go through each table given by "tt" and find the number of times "Same" is printed, for each separate generation. Using `Length[tt]` doesn't distinguish between the two printed words so I'm not sure what control I need to add to have the number of only same printed. I've tried to use a `For` loop on the If statement to get it to perform the desired function but I know it's best to avoid usage of that. Any help would be appreciated.

Answer: 
You can count the number of tuples composed out of identical integers for each sublist with this expression:

```
Map[Count[#, {n_Integer ..}] &, d]

```

which yields for your example of d above

```
{1, 1, 2}

```
```
d = {{{1, 2}, {1, 1}, {2, 3}}, {{1, 4}, {3, 3}, {2, 1}}, {{1, 1}, {3, 1}, {3, 3}}};

Count[{a_ ..}] /@ d

```

> 
> 
> ```
> {1, 1, 2}
> 
> ```
> 
>