Added code to count the intersection between items. Also removed all the erros from the code except for 1.