Let \(S = \left\{ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} : a, b, c, d \in \{0, 1, 2, 3, 4\} \text{ and } A^2 - 4A + 3I = 0 \right\}\) be a set of \(2 \times 2\) matrices. Then the number of matrices in \(S\), for which the sum of the diagonal elements is equal to 4, is: