If you're not using the list elsewhere in your microflow, Mendix does some optimisation if a count follows the retrieve. It turns it into a faster SELECT COUNT SQL statement in this situation. This means the list will show as empty in the debugger. If you need it to populate, just use it somewhere in the microflow.
I hope this helps.
If you don't actually use the list you retrieved in further actions and directly follow it up with a count, Mendix optimizes the underlying query and won't actually query the data; just the count.
(e.g. SELECT COUNT instead of SELECT att1,att2..)
While debugging this indeed leads to an empty list but a correct count.
Thank you, that must be it. I just just confused by the "empty" return value but the count is correct.