Add function rex.count and disallow nil/false as the replacement argument in rex.gsub (issue #10).