How to get total number of rows on a block of a view
Use a views_view_ hook, i.e. views_view_unformatted,  views_view_list  etc... I tried this with a PHP count for my views block and it worked great. 



My function is:

function MYTHEME_preprocess_views_view_unformatted(&amp;$vars) {
  $num_rows = $vars["rows"];
  $count = count($num_rows);
  echo '&lt;h2&gt;This view has ' . $count . ' rows&lt;/h2&gt;&lt;br&gt;';
}


This yielded the number of rows in the view. 

Printed, I see: