count the even pairs in an array