Something like this?

public static void main(String[] args) {
int[] arrayone = new int[10];
int[] arraytwo = new int[10];
int matches=0;
matches = count(arrayone,arraytwo);...