add support to -count flag