I'm trying in this code to search a given element into an array that has random numbers. With scatter and reduce i want just to count how many times the element exists in the array. I scatter the array and the searching is being done in the splitting sub-arrays. Every splitting array finds how many times the element is found in this sub-array and then with reduce i gather all the times that the element is found in the whole primary array.