How do I count the number of nodes in a View
In an executed view object, you can access how many rows or results are returned by looking at:

$count=count($view-&gt;results);


So, if your view returns 2 rows, $count would be 2, if 1, $count would be 1, etc. This can be accessed from a module that executed a view itself or from inside almost any of the views templates as well.