Mendix performs a query optimization: a retrieve list followed by an aggregate list action will be merged into a single query returning only the aggregate result, if the list is not used anymore. This is more efficient than retrieving the entire list from the database, passing it to the business server and then aggregating on the business server.
The work around would be to use the list for another operation.
I haven't found a reference to this in the documentation, but there is a Mendix response here.