Counting the number of heterzygous SNPs per chromosome

Hello! I know that I can filter all the SNPs with heterozygous SNPs and count it with this:
mt_het = mt.filter_rows(hl.agg.all(mt.GT.is_het()))
mt_het.rows().count()
However, instead of making a new mt for every single chromosome, is there a faster method to just count the number of heterozygous SNPs in each chromosome and then store it in a variable? Thank you very much!

You could do:

mt_het = mt.filter_rows(hl.agg.all(mt.GT.is_het()))
counts_per_chrom = mt_het.aggregate_rows(hl.agg.group_by(mt_het.locus.contig, hl.agg.count()))