Let $p \equiv 1 \pmod{4}$ be prime, and let $G$ be a graph such that $|V(G)| = p$ and $\{u,v\} \in E(G) \Longleftrightarrow u-v \equiv x^2 \pmod{p}$ for some integer $x$.
How many times does $G$ contain $K_4$ as a subgraph?
Alternatively, one can ask for the number of subsets $S = \{u_1,\ldots,u_4\} \subset \mathbb{Z}_p$ such that $u_i - u_j$ is a quadratic residue for $i,j \in \{1,\ldots,4\}$, $i \neq j$.
Is there a reason you need to do this, or are you just curious? This paper has a formula, but summarizing the argument would be way to long for me to put here: http://www.math.ucsd.edu/~revans/Pulham.pdf
Computational is nice too (computed in Magma):
p = 5 Number of K4 subgraphs: 0
p = 13 Number of K4 subgraphs: 0
p = 17 Number of K4 subgraphs: 0 *
p = 29 Number of K4 subgraphs: 203
p = 37 Number of K4 subgraphs: 555
p = 41 Number of K4 subgraphs: 1025
p = 53 Number of K4 subgraphs: 3445
p = 61 Number of K4 subgraphs: 6100
p = 73 Number of K4 subgraphs: 13140
p = 89 Number of K4 subgraphs: 31328
p = 97 Number of K4 subgraphs: 46560
[* It is worth noting that for $p=17$, the Paley graph is the largest graph $G$ for which neither $G$ nor $G^{C}$ contain a copy of $K4$.]