signed 5 years' contract with this company.
i have signed 5 years of contract with this company.
i have signed the contract with this company for 5 years.
you might try, i signed/have signed a five-year contract with this company.
how long a contract did you sign with this company?
what was the term of the contract you signed with this company?
p.s. actually, your first question is acceptable.
are there how many verb-patterns? 