Quality is delighting customers
There is a method in Selenium IDE and Selenium RC called "assertXpathCount() for IDE, getxpathcount() for RC" to get the number of rows and columns which satisfies the given Xpath.
Please let me know if you have any doubts.
selenium.getXpathCount("//xpath to table"//tr);
So, if I had a table with an id of "toptable, I could do the following...
int i = selenium.getXpathCount("//table[@id='toptable']//tr");
That should return the number of rows in the table. An even better way is to write a method that will get the number of rows in the table, or the number of columns for a given row. You could write those methods yourself and add them as part of your library. Such as...
public int GetRowCount(String tableXpath)
public int GetColumnCount(String tableXpath, int row)
of course, don't forget to add error handling in case the xpath can not be found.