Created new function that compares two arrays and counts the common values.