flatten arguments of COUNTIF
fix COUNTIF and flatten its range