Add helper.count function.