You can get the number of elements trin the table as follows:
$(".ms-WPBody tr").not(":has(th)").length
This will find all items trwithout a child th.
Full code:
var rowCount = $(".ms-WPBody tr").not(":has(th)").length;
$(".rowCount").text("Num of rows: " + rowCount);
It shows:
Number of lines: 2
And you do not need to use any magic numbers, such as "-1", which can introduce a gross error if the table changes structure.
Updated jsfiddle here: https://jsfiddle.net/quyk2dqg/7/