[math-fun] Algorithm for counting nonisomorphic colorings