Refactor mutations with .count