Cut a triangle into equal-sized parts! Similar in spirit to Number of distinct tilings of an n X n square with free n-polyominoes and Partition a square grid into parts of equal area, this challenge will have you count ways of partitioning a triangle in a triangular grid. The goal of this code-golf challenge is to write a program that outputs \$ a(n,m)\$, the number of ways to partition a triangle of side length \$n\$ into equal parts containing \$m\$ cells each. The parts must contiguous, where two cells are considered touching if they share a side.
Examples
Up to rotation and reflection, there are two ways to partition the size-\$4\$ triangle into equal parts of size \$8\$, so \$a(4,8) = 2\$:


Up to rotation and reflection, there are three ways to partition the size-\$4\$ triangle into four parts of size \$4\$, so \$a(4,4) = 3\$:



Table
 n |  m | a(n,m)
---+----+-------
 1 |  1 | 1
 2 |  1 | 1
 2 |  2 | 0
 2 |  4 | 1
 3 |  1 | 1
 3 |  2 | 0
 3 |  3 | 1
 3 |  9 | 1
 4 |  1 | 1
 4 |  2 | 0
 4 |  3 | 0
 4 |  4 | 3
 4 |  8 | 2
 4 | 16 | 1

(I've made this table by hand, so comment if you spot any mistakes.)
Challenge
Write a program that takes an input \$n\$, which is the size of a triangle, and a parameter \$m\$, which is the size of each region, and return the number of ways to partition the size \$n\$ triangle into \$n^2/m\$ parts of size \$m\$ up to the rotations and reflections of the triangle.
Your code should be able to handle the inputs in the table on TIO, and it should be able to handle larger inputs in principle.
This is a code-golf challenge, so the shortest code wins.
JavaScript (ES7),  367 362 359  357 bytes
Saved 1 byte thanks to @Shaggy
Expects (n)(m).

n=&gt;m=&gt;(T=Array(n*n).fill(N=0),g=(A,P=[-1],k=T.findIndex(v=&gt;!v),B=[...A,P[S='sort']()][S]())=&gt;g[B]?0:~[1,1,0,1,1,0][M='map'](r=&gt;g[B=B[M](P=&gt;P[M](i=&gt;~i?(y=i**.5|0)*y-i-(r?1-((~y*~y+~i&gt;&gt;1)-n)**2:y*~-~y):i)[S]())[S]()]=1)/P[m]?~k?g(B):++N:T[M]((v,j)=&gt;v||(~P?P.every(i=&gt;(y=i**.5|0)^j**.5|(i-j)**2-1&amp;&amp;j-i+2*(i+y&amp;1?y:~y)):j-k)||T[T[j]++,g(A,[...P,j]),j]--))([])&amp;&amp;N

Try it online!
How?
TL;DR
This is a recursive search that keeps track of all the patterns that were already tried, transformed in all possible ways, in order to prune the search as soon as possible when a collision is found. This allows it to perform at a decent speed on small triangles despite an otherwise inefficient piece-building method.
Triangle description and cell indexing
A size-\$n\$ triangle is simply stored as an array of \$n^2\$ binary values. Empty cells are marked with \$0\$'s and occupied cells are marked with \$1\$'s.
JS initialization:
T = Array(n * n).fill(0)

By convention, the cells are numbered from \$0\$ to \$n^2-1\$, from left to right and top to bottom.

Below are some basic formulas:

The 0-indexed row of the cell \$c\$ is \$y_c=\lfloor\sqrt{c}\rfloor\$
The 0-indexed position of the cell \$c\$ within its row is \$c-{y_c}^2\$
The 0-indexed distance of the cell \$c\$ from the last cell in its row is \${(y_c+1)}^2-c-1\$

Testing whether 2 cells are neighbors
Two cells \$c\$ and \$d\$ are horizontal neighbors if \$y_c=y_d\$ and \$|c-d|=1\$ (e.g. \$c=10\$ and \$d=11\$, or the other way around).
Two cells \$c\$ and \$d\$ are vertical neighbors if either:

\$c+y_c\$ is even and \$d=c+2\times(y_c+1)\$ (e.g. \$c=3\$ and \$d=7\$)
\$c+y_c\$ is odd and \$d=c-2\times y_c\$ (e.g. \$c=7\$ and \$d=3\$)

Hence the following JS expression which is truthy if the cells i and j are not neighbors:
(y = i ** .5 | 0) ^ j ** .5 | (i - j) ** 2 - 1 &amp;&amp; j - i + 2 * (i + y &amp; 1 ? y : ~y)

Reflections
A vertical reflection is applied by doing:
$$d=2\times y_c\times (y_c+1)-c$$
Examples:
$$2\times y_{10}\times (y_{10}+1)-10=2\times 3\times 4-10=14\\
2\times y_{14}\times (y_{14}+1)-14=2\times 3\times 4-14=10$$

Rotations
A 120° rotation is applied by doing:
$$d=\left(n-\left\lfloor\dfrac{(y_c+1)^2-c-1}{2}\right\rfloor\right)^2+{y_c}^2-c-1$$
Examples:

\$c=0\$ is turned into \$d=15\$
\$c=7\$ is turned into \$d=12\$


Combining reflections and rotations
In the JS implementation, both formulas are combined into the following expression. This code applies a reflection to the cell i when r = 0 or a rotation when r = 1.
(y = i ** .5 | 0) * y - i - (
  r ?
    1 - ((~y * ~y + ~i &gt;&gt; 1) - n) ** 2
  :
    y * ~-~y
)

To get all possible transformations of a tiling, we apply 2 rotations, followed by a reflection, followed by 2 rotations, followed by a reflection.
Hence the loop:
[1, 1, 0, 1, 1, 0].map(r =&gt;
  /* ... apply the transformation to each cell of each piece of the tilling ... */
)

Describing the tiling
Each piece of the tiling is stored in an array of \$m+1\$ entries consisting of a leading -1 followed by \$m\$ indices corresponding to the cells it contains.
The current piece is stored in P[]. The array A[] contains the previous pieces. The array B[] contains the previous pieces and the current piece, with all pieces sorted in lexicographical order and all indices also sorted in lexicographical order within each piece.
Example:
The following tiling:

would be described with:
B = [
  [ -1, 0, 1, 2, 3 ],
  [ -1, 10, 11, 4, 9 ],
  [ -1, 12, 5, 6, 7 ],
  [ -1, 13, 14, 15, 8 ]
]

Once coerced to a string, this gives a unique key that allows us to detect whether a similar configuration was already encountered and prune the search.
&quot;-1,0,1,2,3,-1,10,11,4,9,-1,12,5,6,7,-1,13,14,15,8&quot;

The purpose of the -1 markers is to make sure that an incomplete piece followed by another piece in the key is not mixed up with another complete piece.
The keys are stored in the underlying object of the function g.
Main algorithm
The recursive search function goes as follows:

find the position k of the first empty cell in the triangle
update B[]
abort if B[] was already encountered
apply all transformations to B[] and mark them as encountered
if P[] is complete:

if the triangle is full (k is set to -1): we've found a new valid tiling, so increment the number of solutions N
otherwise, append P[] to A[] and start building a new piece


if P[] is not yet complete:

if P[] does not contain any tile, append k to it
otherwise, try to append the index of each tile that has at least one neighbor in P[]