A few ways are available with slightly different results
=COUNTIFS(B,"<>"&FALSE,B,"<>")
Counts all cells that are not FALSE and not blank. It counts all cells that have anything in them other than FALSE. This includes numbers and text and dates and all.
=COUNTIF(B,TRUE)+COUNT(B)
Counts all cells that are TRUE and all cells with numeric values. Numeric values are numbers, dates, durations but does not include boolean TRUE/FALSE.
=COUNTIF(B,TRUE)+COUNTIF(B,">=0")+COUNTIF(B,"<0")
Counts all TRUE and all numbers. Ignores all other data types. It will give a blue warning triangle if there is a date or duration anywhere in column B.
I am sure there are additional ways if none of these meet your needs.