
388 S.W.2d 459 (1965)
HARRIS COUNTY, Texas, et al., Appellants,
v.
War. Wood HUNT, Appellee.
No. 14519.
Court of Civil Appeals of Texas, Houston.
March 18, 1965.
*461 Joe Resweber, County Atty., Charles F. Mitchell, Robert R. Randolph, Asst. County Attys., Houston, for appellants.
Overton B. Banks, Houston, for appellee.
WERLEIN, Justice.
This suit was brought by appellee, War. Wood Hunt, for a declaratory judgment declaring that he is the official court reporter of County Civil Court at Law No. 1, of Harris County, Texas, serving under an appointment in full force and effect, and also for a writ of mandamus compelling payment of monthly installments of his salary which have been withheld since January 1, 1964, on the order of appellant, the Commissioners Court of Harris County, Texas. This appeal is from the judgment of the court granting appellee's motion for summary judgment and writ of mandamus.
Appellee alleged in his sworn petition, among other things, that he is now serving and has served continuously since January 1, 1958, as official court reporter of County Civil Court at Law No. 1, Harris County, Texas, under appointments made by the Honorable Judge of said Court on January 1, 1958, and January 2, 1963, respectively evidenced by orders entered in the Minutes of said Court, which appointment of January 2, 1963 shall, in accordance with Article 2326n, Vernon's Annotated Civil Statutes, continue in effect from year to year unless otherwise ordered by *462 the Judge of said Court. The Judge of said Court has never ordered the termination of appellee's position as official court reporter of said Court, and hence under the provisions of said Article, appellee's appointment as such official court reporter is in full force and effect and will continue in effect from year to year unless otherwise ordered by the Judge of said Court. Appellee's salary as official court reporter of said Court is the sum of $10,600.00 annually, payable in monthly installments of $883.33 each.
Appellee also alleged that on September 27, 1963, he became 70 years of age, and on December 16, 1963 the District Judges of Harris County, Texas, purporting to act under authority of Section 6 of Article 2372h, V.A.C.S., entered an order of record in Vol. 282, p. 826, Minutes of the District Courts of Harris County, Texas, prescribing and making applicable to court reporters appointed and employed in the various courts of Harris County, Texas, certain personnel regulations (the revised regulations being approved to become effective January 1, 1959), including mandatory retirement provisions and retirement benefits, theretofore adopted by the Commissioners Court of Harris County, Texas, and made applicable to County and Flood Control District employees, such retirement provisions including the following:
"Any person employed prior to July 1, 1957, who has not become a member of the retirement system and has attained age 50 or over on July 1, 1957, shall be retired when he has attained age 70.
"Any person employed after July 1, 1957, whether a member of the retirement system or not, shall be retired when he has attained age 65."
On December 19, 1963, the Commissioners Court of Harris County entered the following order:
"In connection with the services of Mr. War. Wood Hunt as Court Reporter in Judge Madison Rayburn's County Court at Law, this Commissioners Court now has official notice of the action by the District Judges of Harris County, Texas, on December 16, 1963, adopting certain regulations as applied to all court reporters in the Courts of Harris County,
"Therefore, upon motion of the Commissioner Sayers, seconded by Commissioner Lyons, duly put and carried, it is ordered that Judge Madison Rayburn be sent a certified copy of this order, a copy to be sent to Mr. War. Wood Hunt, to the effect that the December 16, 1963, orders of the judges of the district courts will be complied with, and no salary will be paid to Mr. War. Wood Hunt after December 31, 1963."
Since January 1, 1964, appellee under the direction of the Judge of said County Civil Court at Law No. 1 of Harris County, has served as official court reporter, but his invoices to Harris County, Texas, for the January and February, 1964, installments of his annual salary, each approved by the Judge of said Court and presented to the Auditor of Harris County for payment, in accordance with past procedure, have not been paid. Appellee further alleged in effect that said Auditor and the Commissioners Court have taken the position that his appointment as official court reporter has terminated, and that he has been forcibly retired as of January 1, 1964, although he has never entered into any contract which could subject him to the aforesaid retirement regulations, and such regulations are arbitrary and without any statutory authorization and violative of Article 6252-14, V.A.C.S., providing in effect that no person who is a citizen of this State shall be denied employment solely because of age, and that the aforesaid order of the defendant District Judges is violative of said Article and also of Section 6 of Article 2372h, which provides, with respect to the *463 appointment and discharge of court reporters, the following:
"Nothing contained herein shall be construed as authorizing any change in regard to the time, method and manner of appointment or discharge of juvenile and probation officers, or the County Auditor or his assistants, or court reporters, or as authorizing any change in the number thereof or the salaries to be paid, it being the intention of the Legislature that all of such matters shall continue to be regulated by the Statutes applying thereto."
Appellee further alleged that he had never been invited to join any pension or retirement plan of Harris County, or the State of Texas, and has not desired to join any such plan or made application therefor, and has not been offered a pension retirement and does not intend to join or attempt to join any such retirement plan of Harris County, and that a declaratory judgment should be entered by the Court determining that the orders of the Commissioners Court and the District Judges of Harris County, Texas, are of no effect insofar as they attempt forcibly to terminate appellee's employment as official court reporter and refuse to pay his salary solely because of age.
In his motion for summary judgment, appellee has adopted the allegations of his sworn pleading, attached the affidavit of Judge Madison Rayburn, and attached as exhibits certified copies of the orders referred to in his verified petition and in the affidavit of Judge Rayburn, and certified copies of oaths of office taken by appellee. He asserts that such pleadings together with his supporting affidavits and attached exhibits of said orders show there is no genuine issue as to any material fact, and that he was entitled as a matter of law to summary judgment and writ of mandamus as prayed for.
The law is well settled that in passing upon a motion for summary judgment, all doubts as to the existence of a genuine issue of fact must be resolved against the moving party, and the opposite party is entitled to the benefit of every reasonable inference which can properly be drawn in his favor. Womack v. Allstate Insurance Company, 1957, 156 Tex. 467, 296 S.W.2d 233; Gulbenkian v. Penn, 151 Tex. 412, 252 S.W.2d 929; Gaines v. Hamman, 163 Tex. 618, 358 S.W.2d 557.
Appellants assert that the trial court erred in granting the summary judgment because appellee had failed to negate the existence of facts alleged in their plea of estoppel to the effect that appellee had previously accepted hospitalization insurance benefits bought and paid for by Harris County under and by virtue of its personnel regulations, with full knowledge of the terms and provisions contained therein, and hence appellee should be estopped from denying the validity of such regulations as are made applicable to him. Appellants rely on the general rule that one who accepts the benefits of a contract or transaction that he has entered into, must also assume its burdens. Terrazas v. Carroll, Tex.Civ.App., 277 S.W.2d 274; W. H. Putegnat Co. v. Fidelity & Deposit Co. of Maryland, Tex.Com.App.1930, 29 S.W.2d 1004; Kellner v. Blaschke, Tex.Civ.App., 334 S.W.2d 315, writ ref., n.r.e.
Appellants have conceded in their brief that at the time of appellee's employment as official court reporter for County Civil Court at Law No. 1, he was too old to become a member of the Harris County retirement system. The trial court in its judgment found and declared that appellee had never been subject, by contract or otherwise, to the mandatory retirement regulations of the Commissioners Court of Harris County, Texas, since at the time of his employment in issue he was too old to come within the provisions of the Retirement Act as amended by the District Judges of Harris County, and such provisions do not apply to him; that the District Judges were authorized to pass the regulations *464 they did pass and enter, and such regulations are valid, however the same do not apply to appellee.
It is our view and since appellee was too old at the time of his employment to become a member of the retirement system provided for in the personnel regulations governing the insurance, hospitalization benefits, retirement, and various other matters affecting employees of the County, that the acceptance by him of hospitalization insurance benefits, if he did accept the same, would not estop him from denying the validity of the regulations and forced retirement as applied to him. We see no connection between hospitalization insurance and maximum age regulations in view of Article 2326n which governs the duration of employment, discharge and compensation of appellee. Sec. 1 of Art. 2326n reads as follows:
"In all counties in the State of Texas having a population of one million (1,000,000) or more, according to the last preceding Federal Census, the judge of each district court, civil or criminal, and the judge of each county court at law, civil or criminal, shall appoint an official shorthand reporter for such court. Said appointment shall be evidenced by an order entered in the minutes of each such court. Such appointment, when once made, shall continue in effect from year to year, unless otherwise ordered by the judge of the court in which such reporter serves. The compensation of such reporters shall be fixed by the commissioners court after the recommendation of the judge of the court in which such reporter serves at not less than Six Thousand ($6,000) per annum and not more than Ten Thousand Six Hundred Dollars ($10,600) per annum, in addition to compensation for transcripts, statements of facts and other fees. As amended Acts 1963, 58th Leg., p. 658, ch. 242, § 1."
This Article repeals all laws and parts of laws in conflict with it to the extent of such conflict. It clearly provides that the appointment when once made, shall continue in effect from year to year unless otherwise ordered by the judge of the court in which such reporter serves. This mandatory provision is not restricted by any age limitation. The appointment of the court reporter and the regulations concerning the duration of his service are thus placed with the judge of the court in which the official court reporter serves. Apparently this fact was recognized by the Commissioners Court of Harris County as evidenced by the fact that no steps were taken to retire appellee at age 65, although the personnel regulations provide that any person employed after July 1, 1957, whether a member of the retirement system or not, shall be retired when he has attained age 65.
The personnel regulations of Harris County provide, among other things:
"Because the appointment of, and regulations concerning, * * * Reporters are by law placed with the District Judges, these rules are not prescribed for them, except to the extent authorized by the District Judges."
The District Judges of Harris County on December 16, 1963, ordered that said personnel regulations be made applicable to the Court Reporters appointed and employed by the various courts of Harris County, Texas, save and except as to certain matters not pertinent hereto. This order was made pursuant to Art. 2372h, V.A.C.S. Art. 2372h, Sec. 6, provides:
"In like manner, Court Reporters in the various courts in such counties shall be subject to the provisions of such regulations to the extent that a majority of the District Judges of such counties in meeting assembled may determine by a vote of the majority present; an order to be entered in the minutes of each of the courts of such Judges and a certified copy thereof to be supplied to *465 the Commissioners Court. * * * Nothing contained herein shall be construed as authorizing any change in regard to the time, method and manner of appointment or discharge of * * * Court Reporters, or as authorizing any change in the number thereof or the salaries to be paid, it being the intention of the Legislature that all such matters shall continue to be regulated by the statutes applying thereto."
It seems clear that Art. 2372h, Sec. 6, applies to District Courts and Reporters serving in District Courts, whose appointments are placed by law with the District Judges, and not to Reporters such as appellee whose appointment is placed by law with the Judge of the County Court at Law. This is corroborated by the provision that the order of the District Judges is to be entered in the minutes of each of the courts of such Judges. The trial court found that the order of the District Judges was valid but that it did not apply to appellee. Even if such provision could possibly be construed to include one in the position of appellee, it still would not override the later statutory Article passed in 1959 which relegates to the Judge of the County Civil Court at Law the authority and prerogative of continuing at his will the employment of his court reporter.
Appellants contend that the trial court erred in granting the summary judgment for the reason that appellee did not establish that he had taken the oath required of official court reporters by Article 2322, V.A.C.S., which provides:
"Said reporter in addition to taking the official oath shall subscribe to an oath to be administered to him by the district clerk to the effect that he will well and truly in an impartial manner keep a correct record of all evidence offered in each case reported by him, together with the objections and exceptions made by the parties to each suit, and the rulings and remarks of the court in passing upon the admissibility of testimony."
Appellee took the official oath prescribed by Article XVI, Sec. 1, of the Constitution of Texas, Vernon's Ann.St. on January 1, 1958, and also on January 2, 1963. In such oaths he swore to faithfully and impartially execute and perform the duties of the office of Court Reporter of the County Civil Court at Law of Harris County, State of Texas, etc. The oaths taken do not contain the provisions contained in the oath prescribed in Article 2322, V.A.C.S. In taking such oaths, however, appellee swore to perform the duties of the office of official court reporter, and these are enumerated in Article 2324, V.A.C.S., and include the duties referred to in Article 2322. The oath provided for in Art. 2322, V.A.C.S., is to be administered by the District Clerk. If it be construed to apply to reporters serving in the County Courts at Law it would seem that this Article should have provided as to them that the oath should be administered by the County Clerk rather than the District Clerk.
In any event, appellee was at least a de facto officer, and as such he could recover compensation for services that he rendered although he could not recover for services which were not rendered. City of Houston v. Albers, 33 Tex.Civ.App., 70, 73 S.W. 1084; Glenn v. Trenton, Tex.Civ.App., 256 S.W. 631; 47 Tex.Jur.2d, p. 323, Sec. 63. In the Court's judgment it is provided that mandamus issue commanding the Commissioners Court and Auditor of Harris County to forthwith pay to appellee over due installments of plaintiff's annual salary and to pay, in accordance with established procedure, all future installments of such annual salary payable to plaintiff as official court reporter of County Civil Court at Law No. 1 of Harris County, Texas, unless and until otherwise ordered by the Judge of County Civil Court at Law No. 1 of Harris County, Texas. This mandamus order contemplates the payment to appellee of compensation for services rendered during the *466 employment of appellee in such capacity, and does not provide for payment for services which may not be rendered. It is our view that appellee is entitled to recover the prescribed monthly salary for his services as and when the same are rendered and not otherwise. We know of nothing that would prevent him from now giving the oath prescribed by Art. 2322, V.A.C.S.
By recitations in the orders of the Judge of the County Civil Court at Law No. 1, dated January 1, 1958 and January 2, 1963, which are attached to the motion for summary judgment, appellee established that he had taken the tests required by Article 2321, V.A.C.S., and was thus qualified to act as an official court reporter in such Court.
Appellants assert that the trial court erred in granting appellee's motion for summary judgment after entering an order staying the taking of appellee's deposition because such action denied appellants an opportunity to discover whether there were any further genuine issues of material facts. Appellants requested the District Clerk to issue a commission to take appellee's deposition on June 19, 1964, which was three days before the case was set for trial although appellee's suit was filed on March 19, 1964. Appellee filed a motion to stay the taking of the deposition, alleging, among other things, that the summons served on him required him to produce all his financial records and accounts of fees received by him for transcribing and preparing statements of fact concerning trials in the County Civil Court at Law No. 1, and also the 129th Judicial District Court of Harris County, and that the cross-claim of appellants was so unprecedented and so timed, as to justify the belief that appellants' cross-claim and proposed deposition had as their objective the harassment, oppression and vilification of appellee and the delay of an adjudication of appellee's claim now before the court on motion for summary judgment. On June 15, 1964 the court entered an order staying the taking of appellee's deposition, subject to further orders of the court, and later, on July 6, 1964, the court on its own motion set aside its order staying the taking of such deposition. At the same time, the court granted appellee's motion for summary judgment and entered its judgment on July 13, 1964.
Rule 186b, Texas Rules of Civil Procedure, provides in part:
"After notice is served for taking a deposition on written interrogatories or by oral examination, upon motion seasonably made by any party or by the person to be examined and upon notice and for good cause shown, the court may make an order that the deposition shall not be taken * * *"
Appellants objected and excepted to the Court's order staying the taking of the deposition of appellee in an instrument filed July 6, 1964, in which it is stated that one of the reasons for seeking the taking of a deposition was to discover whether there were any genuine issues of fact, and that it was necessary to take appellee's deposition touching on facts and circumstances with respect to appellants' plea of estoppel, and their cross-action and counter-claim against appellee for fees retained while acting as court reporter for various courts in Harris County, and also because such order of the court staying the taking of the deposition was entered without giving appellants sufficient time to oppose such motion.
Appellee's motion for summary judgment, with the various documents, copies of orders and affidavits attached thereto, was filed on May 4, 1964. Appellants had ample time prior to June to apply for the issuance of a commission to take the deposition of appellee at a date more than three days before the case was set for hearing. Furthermore, as hereinabove stated, under the peculiar facts of this case, appellants' plea of estoppel was not such as would estop *467 appellee from claiming that the personnel regulations of Harris County did not apply to him. The counter-claim of appellants against appellee for alleged fees received by appellee for transcribing shorthand notes, taken in the course of trials at which he had served as official court reporter, was severed from appellee's cause of action for salary for acting as official court reporter.
The determination of whether a deposition should or should not be taken is within the sound discretion of the trial court, and before his ruling may be set aside there must be shown a clear abuse of discretion. Meyer v. Tunks, Tex.Sup.1962, 360 S.W.2d 518. The court in the Meyer case, in construing Rule 186b, T.R.C.P., cited National Bondholders Corporation v. McClintic, 4 Cir., 1938, 99 F.2d 595, in which it is held: "* * * The determination of the existence of the sufficiency of the cause against taking the deposition in this case was for the district judge in his judicial discretion." We cannot say that the court in the instant case clearly abused its discretion in staying the taking of the deposition of appellee.
It is appellants' contention that the trial court erred in severing their counter-claim from appellee's cause of action for salary, because appellants' counter-claim was a compulsory counter-claim under Rule 97(a), T.R.C.P. Appellants assert that appellee's claim for salary for acting as official court reporter and their counter-claim for failure to account for fees, arose out of the transaction and occurrance that was the subject matter of appellee's suit, and that there need not be an absolute identity or factual background between the two claims but only a logical relationship need exist. We would be inclined to agree with appellants if their counter-claim constituted a good cause of action. This it did not.
Appellee takes the position that the trial court erred in severing the cross-action or counter-claim of appellants for the reason that such counter-claim is unmeritorious and untenable and should have been dismissed on appellee's motion. If there was any error on the part of the court, it was in not dismissing appellants' counter-claim. Appellee's lawful compensation consisting of his statutory salary in addition to compensation for transcripts, statements of fact, and other fees, is governed by Article 2326n which applies to official court reporters in Harris County, Texas, and which repeals all laws in conflict therewith to the extent of such conflict. Appellants assert that such Article insofar as it gives court reporters in addition to their salary, compensation for transcripts, statements of fact, and other fees, is invalid and in violation of Article XVI, Sec. 61, of the Constitution of Texas, which in effect abolishes fees of office in certain cases and requires all fees earned by District, County, and precinct officers to be paid into the County treasury.
It is our view that appellee was never an officer within the meaning of Article XVI, Sec. 61, of the Texas Constitution, and hence he is entitled as a matter of law to the fees which he has made and retained. Tom Green County v. Proffitt, Tex.Civ.App. 1946, 195 S.W.2d 845; Robertson v. Ellis County, 38 Tex.Civ.App. 146, 84 S.W. 1097; Lightfoot v. Lane, 1911, 104 Tex. 447, 140 S.W. 89. Even if appellee was an officer within the purview of Article XVI, Sec. 61, of the Texas Constitution, appellants would not be entitled to recover anything from him by virtue of their counter-claim, since he retained the fees sued for in good faith under the belief that he was entitled thereto by virtue of Article 2326n which has never been held to be invalid or unconstitutional. In the recent case of Wichita County v. Robinson, 1955, 155 Tex. 1, 276 S.W.2d 509, our Supreme Court, in a well considered opinion written by Justice Culver, held that the County was not entitled to recover from the respondent the compensation paid to him in reliance upon the validity of the law and on the advice of the Attorney General. The Court said:

*468 "The rule that unconstitutional law is a nullity is not applied to work hardship and impose liability on a public official who in performance of duty has acted in good faith relying on the validity of a statute before it has been declared invalid. 16 C.J.S. Constitutional Law § 101c; Golden v. Thompson, 194 Miss. 241, 11 So.2d 906; O'Shields v. Caldwell, 207 S.C. 194, 35 S.E.2d 184; Allen v. Holbrook, 103 Utah 319, 135 P.2d 242."
The foregoing paragraph disposes of appellants' contention that the trial court erred in granting the summary judgment and directing the Commissioners Court and County Auditor of Harris County to issue warrants for appellee's salary in view of Article 3912e, Sec. 19(m), V.A.C.S., which provides:
"All moneys drawn from said Officers' Salary Funds shall be paid out only on warrants approved by the county auditor. No warrants shall be drawn on said fund in favor of any person indebted to the State, county, or to said fund or in favor of his agent or assignee until such debt is paid, when notice of such indebtedness has been filed with the county auditor."
We hold that the counter-claim of appellants fails to show as a matter of law any indebtedness owing by appellee to the County since appellee is not an officer within the meaning of Article XVI. Sec. 61, of the Constitution of Texas. We also hold as a matter of law that the County has asserted in such counter-claim no valid collectible claim for indebtedness against appellee which would prevent compliance with the Court's order requiring payment of his salary.
We have concluded that appellants have failed to raise any issue of material fact and that the trial court's judgment should be affirmed.
Judgment affirmed.
