SyntaxFix
Write A Post
Hire A Developer
Questions
Alternatively...
var rowCount = $('table#myTable tr:last').index() + 1;
jsFiddle DEMO
This will ensure that any nested table-rows are not also counted.