Function to return the count the number of possible arrays mod P of length K such that the product of all elements of that array is equal to the product of all elements of the given array of length N
def countArrays ( arr , N , K , P ) : NEW_LINE