[ WEJA-24 ] Fix the list method of ApiCommand: Able to return both list of entites and total number of results in a single call