-335(5) insufficiency of service of process; (6) failure to state a claim upon which relief can be granted; (7) failure to join an indispensable party; or (8) that the complaint is so v a ^ e or ambiguous that the defendant cannot reasonably be required to frame an answer. (b) The motion to dismiss shall distinctly specify the grounds upon which any of the defenses or objections to the complaint are taken. The defenses or objections may be taken to the whole complaint or to any claim for relief stated therein. (c) Any defense or objection to the complaint which may be made by motion to dismiss, other than that it is so vague and ambiguous that the defendant cannot reasonably be required to frame an answer, may be made either by motion to dismiss or in the answer, at the option of the defendant. § 775. Answer; counterclaims (a) The answer may contain a denial of any or all of the material facts stated in the complaint, which the defendant believes to be untrue, and also a statement, in a plain and direct manner, of any other facts constituting a defense or a counterclaim upon which an action might be brought by the defendant against the plaintiff, or his assignor, in a magistrate's court. (b) Section 202 of this title, relating to counterclaims in case of death or assignment, applies to the magistrates' courts. § 776. Failure to set up counterclaim If the defendant omits to set up, as a counterclaim, a claim which arises out of the transaction or occurrence that is the subject matter of the plaintiff's claim, and does not require for its adjudication the presence of third parties of whom the court can not acquire jurisdiction, and upon which an action might have been brought in the magistrate's court by the defendant against the plaintiff or his assignor, neither the defendant nor his assignee may afterwards maintain an action against the plaintiff therefor. § 777. Motion to strike answer; objections and defenses to answer (a) When the answer contains new matter in avoidance, or constituting a defense or a counterclaim, the plaintiff may, at any time before the trial, make a motion to strike the answer for insufficiency, stating therein the grounds of the motion. (b) Whether or not the plaintiff makes a motion to strike the answer, the averments in the answer shall be taken as denied or avoided, and the plaintiff may assert at the trial any objection or defense in law or in fact to the answer. § 778. Proceedings on motions The proceedings on motions are as follows: (1) if the motion to dismiss the complaint is granted, the plaintiff may amend his complaint within such time, not exceeding two days, as the court allows; (2) if the motion to dismiss the complaint is denied, the defendant may answer forthwith; (3) if the motion to strike the answer is granted, the defendant may amend his answer within such time, not exceeding two days, as the court allows; and (4) if the motion to strike the answer is denied, the action shall proceed as if no motion had been interposed.