Query discount rules using WQL (Wix Query Language). Total entries (pagingMetadata.total) will be returned only for the first page.
pagingMetadata.total
Note: discountRule.status can't be used for querying.
discountRule.status