Docs say to go to Tools->Options->LibreOffice Calc->Calculate and check ‘Case Sensitive’. I’ve done; and actually it was already set.
I tried “enable regular expressions…” too; same results.
a1 = a
a2 = A
b3 = countif(a1:a2, “A”) returns 2
b4 = countif(a1:a2, “a”) returns 2