If you do a retrieve and then just use the retrieve to count the number of objects in the list, the microflow gets optimized and the retrieve action gets replaced by a special retrieve count action so the query to the database is simpler.
That said, the debugger should still break on that block, even though it's not exactly the same action. There is code that explicitly moves the breakpoint to the new block so I'm not sure why it's not working. Could you file a ticket with the project this is happening in?