1190 Add gem count_by