A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
I don't know how the algorithm works or why, but COUNTIF, SUMIF etc. clearly try to treat text and numbers interchangeably.
=COUNTIF(range, 5) returns the same result as =COUNTIF(range, "5")