I find the language of counting triangles when congruent triangles are the same to be confusing, so I will rephrase the problem:
The set $T$ contains all triangles formed by selecting the vertices of a triangle from the vertices of a regular $n$-gon. Two triangles in $T$ are in the same equivalence class if and only if they are congruent. This partitions the set $T$ into $f(n)$ non-empty equivalence classes. What is $f(n)$?
Triangles without considering congruence
First of all, if we count every triangle separately (even if it is congruent to a triangle already counted), there are $\dbinom n3 = \dfrac{n(n-1)(n-2)}{6}$ triangles.
Now let's consider separately the equilateral triangles, non-equilateral isosceles triangles, and scalene triangles.
I will count each subset by distinct triangles before counting equivalence classes, although the first step may seem unnecessary for some of the triangles.
I think doing it this way makes the count of scalene equivalence classes easier.
Equilateral triangles
If $n$ is a multiple of $3$ there are $\dfrac n3$ equilateral triangles,
counting distinct congruent triangles as individuals.
Otherwise there are no equilateral triangles. Result:
$$
Q_\text{equilateral} = \begin{cases}
\dfrac n3 & \text{$n$ divisible by $3$}, \\
0 & \text{$n$ not divisible by $3$}.
\end{cases}
$$
All equilateral triangles of an $n$-gon are congruent, so the number of equivalence classes is
$$
C_\text{equilateral} = \begin{cases}
1 & \text{$n$ divisible by $3$}, \\
0 & \text{$n$ not divisible by $3$}.
\end{cases}
$$
Non-equilateral isosceles triangles
For $n$ not a multiple of $3,$ choose a vertex of the $n$-gon to be the apex of an isosceles triangle.
If $n$ is even there are $n - 2$ remaining vertices that can be the two vertices of the base of the triangle; picking one such vertex determines the other vertex of the base, giving $\dfrac{n-2}{2}$ triangles with a given apex.
Since the apex can be chosen $n$ ways, this is $\dfrac{n(n-2)}{2}$ triangles altogether.
If $n$ is odd there are $n - 1$ remaining vertices for the base,
giving $\dfrac{n-1}{2}$ triangles with a given apex, $\dfrac{n(n-1)}{2}$ altogether.
If $n$ is a multiple of $3$ then the previous method of choosing an isosceles triangle chooses each equilateral triangle in three ways. (It uses each vertex of the equilateral triangle as the apex of an isosceles triangle once.)
Therefore the previous method overcounts the non-equilateral isosceles triangles by three times the number of equilateral triangles, that is, it overcounts by $n,$
and we must subtract $n$ from that result.
Over all cases this gives the result
$$
Q_\text{isoscelesNE} = \begin{cases}
\dfrac{n(n-2)}{2} & n \equiv \pm 2 \pmod 6, \\
\dfrac{n(n-1)}{2} & n \equiv \pm 1 \pmod 6, \\
\dfrac{n(n-4)}{2} & n \equiv 0 \pmod 6, \\
\dfrac{n(n-3)}{2} & n \equiv 3 \pmod 6.
\end{cases}
$$
Note that the sum $Q_\text{equilateral} + Q_\text{isoscelesNE}$
matches the result in
this answer,
which counts all isosceles triangles without excluding equilateral triangles.
There are $n$ triangles in each equivalence class containing an isosceles triangle, since such a triangle can be rotated in $n$ orientations on the $n$-gon, producing a distinct triangle each time.
The number of equivalence classes is therefore
$$
C_\text{isoscelesNE}
= \frac{Q_\text{isoscelesNE}}{n} = \begin{cases}
\dfrac{n-2}{2} & n \equiv \pm 2 \pmod 6, \\
\dfrac{n-1}{2} & n \equiv \pm 1 \pmod 6, \\
\dfrac{n-4}{2} & n \equiv 0 \pmod 6, \\
\dfrac{n-3}{2} & n \equiv 3 \pmod 6.
\end{cases}
$$
Scalene triangles
The number of scalene triangles is the total number of triangles minus the number of non-scalene triangles. Considering all the cases for equilateral triangles and non-equilateral isosceles triangles, when we remove all of these triangles from the
$\dbinom n3$ triangles in $T$ we are left with
$$
Q_\text{scalene} = \begin{cases}
\dbinom n3 - \dfrac{n(n-2)}{2} & n \equiv \pm 2 \pmod 6, \\
\dbinom n3 - \dfrac{n(n-1)}{2} & n \equiv \pm 1 \pmod 6, \\
\dbinom n3 - \dfrac{n(n-4)}{2} - \dfrac n3 & n \equiv 0 \pmod 6, \\
\dbinom n3 - \dfrac{n(n-3)}{2} - \dfrac n3 & n \equiv 3 \pmod 6.
\end{cases}
$$
Simplifying each case,
$$
Q_\text{scalene} = \begin{cases}
\dfrac16 n (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\
\dfrac16 n (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\
\dfrac16 n (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\
\dfrac16 n(n - 3)^2 & n \equiv 3 \pmod 6.
\end{cases}
$$
Each equivalence class contains $2n$ triangles, $n$ triangles that are rotations of a given scalene triangle and $n$ rotations of a reflection of that triangle. The number of equivalence classes is therefore
$$
C_\text{scalene} = \frac{Q_\text{scalene}}{2n} = \begin{cases}
\dfrac1{12} (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\
\dfrac1{12} (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\
\dfrac1{12} (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\
\dfrac1{12} (n - 3)^2 & n \equiv 3 \pmod 6.
\end{cases}
$$
Equivalence classes
Now we can add up the equivalence classes of each kind:
$C = C_\text{equilateral} + C_\text{isoscelesNE} + C_\text{scalene}.$
The result is
$$
C = \begin{cases}
\dfrac12 (n - 2) + \dfrac1{12} (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\
\dfrac12 (n - 1) + \dfrac1{12} (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\
1 + \dfrac12 (n - 4) + \dfrac1{12} (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\
1 + \dfrac12 (n - 3) + \dfrac1{12} (n - 3)^2 & n \equiv 3 \pmod 6.
\end{cases}
$$
Simplified, this is
$$
C = \begin{cases}
\dfrac1{12} (n^2 - 4) & n \equiv \pm 2 \pmod 6, \\
\dfrac1{12} (n^2 - 1) & n \equiv \pm 1 \pmod 6, \\
\dfrac1{12} n^2 & n \equiv 0 \pmod 6, \\
\dfrac1{12} (n^2 + 3) & n \equiv 3 \pmod 6.
\end{cases}
$$
These are very similar formulas, just adding or subtracting different constants from $n^2$ before dividing by $12.$ This suggests that we can combine the formulas using the greatest integer (aka floor) function, something like
$$
C = \left\lfloor\frac{n^2+q}{12}\right\rfloor.
$$
If $q \geq 8$ this will give an incorrect result in the case
$n \equiv \pm 2 \pmod 6$;
if $q < 3$ this will give an incorrect result in the case
$n \equiv 3 \pmod 6.$
But we get correct results in all four cases if $3 \leq q < 8.$
In particular,
$$
C = \left\lfloor\frac{n^2+3}{12}\right\rfloor.
$$