Reducing tuple values with reduceByKey in Pyspark
Ok, I found the issue. 
When reducing for example (id, (x, x, 1)), (id, (y, y, 1)), (id, (z, z, 1)), in the first reduce you would obtain (id, 2), (id, (z, z, 1)) so when trying to reducing again, the number 2 in the first element is non subscriptable, I must keep the data structure during the process.
I'm starting to work with the MapReduce paradigm with Pyspark, I'm stuck with a problem and I don't know if it a programming error or that I shouldn't do it this way.
I have data from which I am extracting the following information with map for each line:
(id, (date, length, counter)), I did it this way to extract all the info I need from the raw data file and filtering the noisy lines so I don't have to use the raw data file again. Btw: Counter is originally 1, and it is intended for addition in future reduceByKey.
Now the data looks like this:
data = [('45', ('28/5/2010', 0.63, 1)), ('43', ('21/2/2012', 2.166, 1)), ('9', ('12/1/2009', 2.33, 1))]
First, I am trying to count the number of key-value pairs, so it is a simple reduceByKey adding the counters, I tried to do it this way: data.reduceByKey(lambda a,b: a[2] + b[2]) which provides the following error TypeError: 'int' object is not subscriptable. 
If a and b are supposed to get the value of the pair, the element 2 is supposed to have the counter of it, I cannot get my head around it. Is it better to map several times the raw data file extracting every-time a different needed value? Should I map this data variable extracting (key, value) pairs each time with the value needed from the tuple? Is it just that I'm making a programming error? 
Any guidance is welcome, thanks!