Pregunta de entrevista de General Motors (GM)

Coding challenge, there's an array, write a python code to return the count of the number of monotically increasing, decreasing and constant pairs in the array. Identify edge cases and return -1 if the count exceeds 1 million.