I'm using R programming btw. 

So say I have a data frame like this.

```
        row.names   Tx    Hx     Tn
1        51        33.9  43.48  24.9
2        52        33.0  41.03  22.5
3        64        32.8  37.74  23.3
4        65        32.7  44.53  22.3
5        66        34.9  42.43  23.5
6        77        33.6  38.74  21.8
7        78        34.6  45.46  27.1
8        84        32.9  41.67  24.1
9        85        35.1  43.15  25.0
10      117        32.0  37.11  20.0

```

I'm trying to figure out how many times two or more consective numbers and three or more consective nummbers occur in the column row.names.

So for this example 51, 52 then 64, 65, 66 then 77, 78 and lastly 84, 85. I just want a count for how many times this happens for two or more consective numbers and three or more consective numbers.

My result would be

```
2+ = 4
3+ = 1

```

Thanks for your help in advance!