Hello everyone,
I'm trying to combine the following datasets (this is a subsample)

DATASET 1
PHP Code:
id    value
2435646    7894568
2435646    6589044
2435646    5673686
6557789    6577856
6557789    2535346
8799085    5632546
8799085    8678658
8799085    9788885
8799085    8325155
3422345    4334356
1443259    6453431
1443259    2331344 
DATASET 2
PHP Code:
id    value2
1443259    132445
1443259    5674567
1443259    756789
1443259    96965
7333445    5837357
2435646    789678
2435646    5676266
6557789    336856
3322445    6567848
9900343    8969769
8799085    245535
8799085    643563 
Therefore, in each dataset I have two variables and the ID is the common identifier in both. For example, the id:2435646 (the first one) is reputed three times in DATASET 1 and two times in DATASET 2. The id: 6557789 appeared two times in DATASET 1 and one time in DATASET 2, an so on. DATASET 1 has over a million observations while DATASET 2 has around 50 thousand.

What I need is to merge/combine both datasets in order to find out how many id´s are repeated in both databases (not all id´s are repeated in both bases -are unique id´s-) and then calculate the sum of the two values (value 1 and value 2 ) that appear in both bases.

My first attempt was to use the m:m merge, however I have seen that is not recommended to use since it is no reliable with the results.

Thanks in advance