not sending correct link to set the password in registration email [closed]

you need to pass the post id as parameter and check it will give the result you want
in function.php

function tr_count($post_id){  
ob_start();  
the_content();  
$content = ob_get_clean();  
return substr_count($content, '<tr>');  
}

in single.php

echo tr_count(get_the_ID());