PMCH: Count perfect matchings