Check the number of arguments for each function

Signed-off-by: Julien Danjou <julien@danjou.info>