5. Let the set $I=\{0,1,2, \cdots, 22\}, A=\{(a, b, c, d) \mid a, b, c, d \in I, a+d \equiv 1(\bmod 23)$, and $a d-b c \equiv 0$ $(\bmod 23)\}$, then the number of elements in set $A$ is
$$
a+d \equiv 1(\bmod 23) \Rightarrow a+d=1,24 \text {. }
$$

If $a+d=1 \Rightarrow(a, d)=(0,1),(1,0)$.
When $(a, d)=(0,1)$, $b c \equiv 0(\bmod 23) \Rightarrow b=0$ or $c=0$, it is easy to know that $(b, c)$ has a total of $23 \times 2-1=45$ pairs; similarly, when $(a, d)=(1,0)$, $(b, c)$ also has 45 pairs;
If $a+d=24 \Rightarrow(a, d)=(2,22),(3,21),(4,20),(5,19),(6,18),(7,17),(8,16),(9,15),(10,14)$, $(11,13),(12,12),(13,11),(14,10),(15,9),(16,8),(17,7),(18,6),(19,5),(20,4),(21,3),(22,2)$.
When $(a, d)=(2,22)$, $b c \equiv 21(\bmod 23)$, $b=0$ has no solution; $b=1$ gives $c=21$;
Also, $2 c \equiv 21(\bmod 23) \Rightarrow c \equiv \frac{21}{2} \equiv \frac{44}{2}=22(\bmod 23) \Rightarrow c=22$;
$3 c \equiv 21(\bmod 23) \Rightarrow c \equiv 7(\bmod 23) \Rightarrow c=7 ; \cdots$, it is easy to know that $(b, c)$ has a total of 22 pairs;
Similarly, when $(a, d)$ is in other cases, $(b, c)$ also has 22 pairs each.
Therefore, the number of elements in set $A$ is $2 \times 45+21 \times 22=552$.