A for loop in Verilog does not operate temporally as it does in an imperative programming language. Instead a for loop is unrolled spatially into parallel logic.
Furthermore
<= is a non-blocking assignment and should only be used in edge triggered (i.e. posedge clock) always blocks.
= is a blocking assignment and should only be used in combinational always blocks (i.e. always @*).
Using blocking assignments in a edge triggered always block might sometimes correctly infer a register, but is a very bad coding practice and in this case will result in something that looks like it's working but is trying to run 40 iterations of compares and adds in parallel, which will be a huge slow mess of logic.
Using the non-blocking assignments breaks the simulation as the count <= count + 1 gets scheduled multiple times but only occurs once, so it only increments once each clock cycle. Once again a problem with understanding how the for loop works in Verilog and how non-blocking assignments are scheduled.