A cube has eight vertices (corners) and twelve edges. A segment, such as $x$, which joins two vertices not joined by an edge is called a diagonal. Segment $y$ is also a diagonal. Find the total number of diagonals in a cube.

Let's think step by step and output the final answer within \boxed{}.
user