This can be done ~5 times faster by using UnitStep
:
L=RandomInteger[{0,9},1000000];
RepeatedTiming[Count[L,x_?(#>5&)]]
bool[x_]:=x>5
RepeatedTiming[Count[bool/@L,True]]
RepeatedTiming[Count[L,x_/;x>5]]
RepeatedTiming[Count[Thread[L>5],True]]
RepeatedTiming[Count[UnitStep[5-L],0]]
RepeatedTiming[Fold[#1+Boole[#2>5]&,0,L]]
RepeatedTiming[Total[Boole[#>5]&/@L]]
RepeatedTiming[Total[1-UnitStep[5-L]]]
RepeatedTiming[Length[L] - Total[UnitStep[5 - L]]]
gives me:
{0.474,400314}
{0.4834,400314}
{0.314,400314}
{0.26,400314}
{0.038,400314}
{0.0301,400314}
{0.022,400314}
{0.0067,400314}
{0.0045, 400314}