The provided code seems correct for getting the count of the master rows in the Grid.
grid = $(
masterRowsCount = grid.tbody.find(
This code should be executed after the Grid has bounded the data. You might receive 0 if you are calling it before that.
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI