Connecting Contacts and Leads

Connecting Contacts and Leads

Hi,
I found out that if a lead is already converted to contact, and another lead comes into the system (with the same data), they can live side to side without any connection between them (although they have the same email/phone in both).

Is there a way, that I can AUTOMATICALY connect them both, so that in the Leads page I'll have a column with a checkbox that says "converted lead", and number of past purchases?

I assume it can be done somehow with functions.

Thanks
Amihay