Do donated raw materials count towards the cost limit?
Yes. I would like to point you to Section 8.3.3 of the Game Manual, entitled “Budget Constraints”. 22.214.171.124C covers this exact situation:
The fair market value of an item obtained at a discount or as a donation. Fair market value is that price at which the supplier would normally offer the item to other customers. Also considered to be “fair market value” are the discounted prices offered to all teams by suppliers with established relations with FIRST.
Any and all questions about accounting for materials may be found in that section.
Yes, per the cost rules as if you purchased them yourself. (See part C of Section 126.96.36.199 in the Game Manual.)
Still, the good news is you don’t have to pay for donated materials!