Integrated the count phone number occurences in javascript