'Change calculation total of a mat-paginator

I have a mat-table where some of rows cant count on total numbers of rows on mat-paginator. I need that mat paginator calculate total of pages ignoring that rows. How I can do that?

table with ignored rows



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source