DAX counting using Rankx, allexcept
Rank =
RANKX(
All('First Inspections'), -- Use ALL on the Provider ID column to remove any filters applied to it
CALCULATE(
COUNTROWS('First Inspections'), -- Count the rows for each Provider ID
ALLEXCEPT('First Inspections', 'First Inspections'[Provider Type]) -- Remove all filters except for Provider ID
)
)