Let $X =S^4$ where $S$ can be any non-empty set. For all $q = (x_1,x_2,x_3,x_4) \in X$ and $p = (y_1,y_2,y_3,y_4) \in X$ set
$$d(q,p) = \#\{j: x_j \neq y_j \},$$
the number of components in which $p$ and $q$ differ.
Is $d$ a metric on $X$?
I think I solved this problem with discrete metric space proof approach, but if $q,p,t\in X$, I don't know how to prove the triangle Inequality
$$ d(q,p) \le d(q,t) + d(t,p).$$
Your $d$ is a metric. All properties except the triangle inequality are easy to verify.
Let $p = (p_1, p_2, p_3, p_4), q = (q_1, q_2, q_3, q_4), t = (t_1, t_2, t_3, t_4)$.
If $p_i \ne q_i$ then certainly $p_i \ne t_i$ or $q_i \ne t_i$ because otherwise we would have $p_i = t_i = q_i$. Therefore
$$\{i : p_i \ne q_i\} \subseteq \{i : p_i \ne t_i\} \cup \{i : q_i \ne t_i\}$$ so taking cardinalities it follows $$d(p,q) \le d(p,t) + d(t,q)$$