I have created a function in Haskell to counts the number of functions and operators in the given expression.
size :: Expr -> Int size (Num n) = 1 size x