Dynamic tables are quite common in modern web. In these dynamic tables, Number of rows and columns depends on the data fetched by the input given by the user or any other parameters that define the table. aria-rowcount (property) will be ideal to use in scenarios where the total number of rows are not available currently in the DOM. If all the rows of the table are present in the DOM this property) is not required. The user agents can calculate the total number of rows in the table and share it with assistive technologies.
Along with aria-rowcount property aria-rowindex property also need to be provided for user agents to effectively inform the position of current row within the table in case of dynamic tables.
Developers must set the value of aria-rowcount to an integer equal to the number of rows in the full table. In case the total number of rows is unknown, authors must set the value of aria-rowcount to -1 to indicate that the value should not be calculated by the user agent.
Aria-rowcount property used in roles
Values of aria-rowcount property
Integer that is equal to the total number of rows in the table. The value must be -1 (minus one) if the total number of rows is unknown.
Also have a look at aria-colcount and aria-colindex properties.