Text this: Computing the degree of some matchings in a graph