replaced count with aggregate option on DB\repository getWithRelations method