Dwight has nine coins consisting of only pennies and nickels. If the total value of the coins is 29 cents, how many nickels does Dwight have?