The sheriff may appoint one person learned in the law and admitted to practice in the county of this Commonwealth as his solicitor. Said solicitor shall advise the sheriff upon all legal matters that may be submitted to him, and shall conduct any litigation in connection with the sheriff's office, when requested so to do by the sheriff.
16 P.S. § 4213