This is normally the job of a quantity surveyor who should enjoy maths.
You would work out the surface area of the wall in question and then knowing the surface area of a brick, would then divide the area of the wall by that ,and get a figure for how many bricks are in the wall.
To calculate the surface area of a layer of single bricks, the wall, or the brick, for that matter.
You would take the width of the wall by the height of the wall, and mutiply them by each other.
Then with the result, you would decide how thick you want the wall, normally it is two bricks thick these days, and so you could just double the result that you got for the wall.
This would give you the quantity of bricks, if you then divide the surface area of the wall, by the area of one brick. you will have your quantity.