5.38 It is known that a certain parliament has a total of 30 members, and any two of them are either friends or political enemies. Each member has exactly 6 political enemies. Any three members form a three-person committee. If the three members in a committee are all friends or all political enemies to each other, it is called a "good committee". Find the number of all good committees.

保留源文本的换行和格式，直接输出翻译结果如下：

5.38 It is known that a certain parliament has a total of 30 members, and any two of them are either friends or political enemies, each member has exactly 6 political enemies. Any three members form a three-person committee. If the three members in a committee are all friends or all political enemies to each other, it is called a "good committee". Find the number of all good committees.
[Solution 1] Let the set of all good committees be denoted as $X$, and the set of all other committees as $Y$. The number of elements in sets $X$ and $Y$ are denoted as $x$ and $y$ respectively. Thus,
$$
x+y=C_{30}^{3}=4060 \text {. }
$$

For any senator $a$, let the set of all committees that $a$ participates in be denoted as $S_{a}$. In $S_{a}$, the total number of committees where the other two members are either both friends or both enemies of $a$ is $C_{6}^{2}+C_{23}^{2}=268$. For the 30 senators, the total number of such committees is 8040. Clearly, in this counting process, each committee in $X$ is counted 3 times, while each committee in $Y$ is counted only once, hence
$$
3 x+y=8040 \text {. }
$$

Solving (1) and (2) simultaneously, we get $x=1990$.
[Solution 2] Use 30 points to represent the 30 senators. If two senators are friends, draw a red line between the corresponding two points; otherwise, draw a blue line. Clearly, a good committee translates to a monochromatic triangle, and the problem is to find the total number of monochromatic triangles in the graph. To do this, we first find the total number of heterochromatic triangles, where the three sides are not all the same color.

We call an angle with two sides of different colors a heterochromatic angle. Clearly, each heterochromatic triangle has exactly two heterochromatic angles. Each vertex in the graph emits exactly 6 blue lines and 23 red lines, forming $23 \times 6=138$ heterochromatic angles. Therefore, the total number of heterochromatic triangles is $138 \times 30 \div 2=2070$. Since the total number of triangles with vertices among the 30 points is $C_{30}^{3}=4060$, the total number of monochromatic triangles, i.e., the number of good committees, is 1990.