Suppose we have a set of $n$ elements. We want to know the maximum number of subsets of $3$ elements we can find of this set such that no two subsets have an intersection with $2$ or more elements.
The question arises from trying to count the number of subgroups isomorphic to $\mathbb{Z}_2\times\mathbb{Z}_2$ in a group with $n$ elements of order $2$ such that the product of any two such elements has also order $2$.
The maximum possible size of a family of $3$-element subsets of an $n$-element set, no two of which have more than one element in common, is $$\left\lfloor\frac n3\left\lfloor\frac{n-1}2\right\rfloor\right\rfloor-\varepsilon$$ where $\varepsilon=1$ if $n\equiv5\pmod6$ and $\varepsilon=0$ otherwise. This is OEIS sequence A001839.
References.
T. P. Kirkman, On a problem in combinations, Cambridge and Dublin Math. J. 2 (1947), 191–204.
J. Schönheim, On maximal systems of $k$-tuples, Studia Sci. Math. Hungar. 1 (1946), 363–368.
Richard K. Guy, A problem of Zarankiewicz, in: Theory of Graphs (Proc. Colloq., Tihany 1966; P. Erdős and G. Katona, eds.), Academic Press, New York, 1968, pp. 119—150.
Joel Spencer, Maximal consistent families of triples, J. Combin. Theory 5 (1968), 1–8.
J. C. Swift, Quasi Steiner systems, Atti Accad. Naz. Lincei Rend. Cl. Sci. Fis. Mat. Natur. 44 (1968), 563–569.