```
def findLongestChain(self, pairs):
pairs.sort(key=lambda x : x[1])
count = 1
r = 0
while r < (len(pairs) - 1):
inc = True
for k in xrange(r + 1, len(pairs)):
if pairs[r][1] < pairs[k][0]:
count += 1
r = k
inc = False
break
if inc: r += 1
return count
```