Thank you very much for your answers and the in-depth explanations. I already knew the reason behind using brush entities is to exclude them from visibility calculations, speeding up the process, but I wrongly thought they didn't count against the brush limit, too. Now that I understand it, the maps I already liked (in other mods) seem even more impressive, having been done under those limits (I'm talking about vanilla HL engine that is). Still, that 32768 limit is not that hard to reach if you start adding detail, what a pity.
I will edit the bookcase prefab so remove all unneeded detail and leave it bare bones, then replace the existing ones. Is there a quick way of doing it? Instead of going one by one.
By the way, while investigating this issue I did a test and found out that func_wall entities do not cast shadows on the world, while func_detail did. Is this behavior expected? I thought they were mostly the same.