hi!
there is no count by field in the ML jobs.
I assume you mean by_field_name which is a way to split the analysis (like a "for each"). It is similar to partition_field_name but has subtle differences.
sounds like all you need is a count function and define a partition_field_name and that's all!