The compensation of an attorney at law, solicitor, or counselor for his services is governed by agreement, expressed or implied, which is not restrained by law.