That is like asking a mad scientist to reveal their secret...formula
in RSA we have a simple formula for calculating the amount of bricks in a wall.
For a 220mm thick masonry brick wall
(Area / 1 m²) * 110
For a 110mm thick masonry brick wall
(Area / 1 m²) * 50
These are specific to our brick sizes here, but I am sure that you can replace with your constants.
I was fortunate to attend a training course with Phil Read, and he did some scary stuff with formulae.See attached images. Both same family just changed figures.
ps. Phil not to worry, I won't reveal the secret