According to the Celltable Developers Guide here:
The example given for AsyncDataProvider seems to have a flaw here when setting the row count.
// Add the columns.
table.addColumn(nameColumn, "Name");
table.addColumn(addressColumn, "Address");
// Set the total row count. You might send an RPC request to determine the total row count.
table.setRowCount(CONTACTS.size(), true);
// Set the range to display. In this case, our visible range is smaller than the data set.
table.setVisibleRange(0, 3);
As the comment suggests, an RPC call would likely be necessary and it would likely be asynchronous.
That leaves the question, how does one know that the RPC call will return with the size by the time it is needed/used later on? Should method wait until the value is returned?