Solution to the Problem:
The answer is 30 bricks; five rows of six apiece.
An aerial view of the chimney looks like this:
James Alarie noted that I did not specify a square chimney. Here is his additional answer:
If the chimney is not square:
it might have zero space for the flue gasses (a simple slit down the
middle) and have only 4 bricks per layer for a total of 20 bricks.
it might have a flue width of 1/2 brick; 5 bricks per layer = 25 bricks total.
it might have a flue width of 1 brick (it's square); the
originally-mentioned 30 bricks total.
it might have a flue width greater than 1 brick and the total would
be 20 + 10 * width.