Single range A:
=COUNTIFS(M$14:M$16,">0")
Result: 3
Expected: 3
Single range B:
=COUNTIFS(M$19:M$21,">0")
Result: 3
Expected: 3
Multiple ranges A and B:
=COUNTIFS(M$14:M$16,">0",M$19:M$21,">0")
Result: 3
Expected: 6
Also note that changing one of the ranges to only be 2 cells throws Err: 502
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded