Hi @SG013
There are many ways to do it, but it depends on whether you are using a Canvas App or Model Driven Apps.
If you are using Model Driven, use the views and filter by the attribute so that you can obtain the total number of records with that characteristic. If you are using Canvas Apps you must create a collection with the dataverse table, and then you can use the countrow in a label, you can also make a countrow against the dataverse table, here you must be careful with delegation.
Like the previous point, you can do it in various ways, the classic thing is to include within the form a subgrid of the related table and it will give you the records, then you can use JS to count the total records of that grid, or use a rollup to tell.
You can also use the filters within the views and there you can filter by the parameters you want. Everything will depend on what you are really looking for and need, because what you need may be a Dashboard in Power Bi.