Count number of nodes to be output
No need to modify template files. Instead create a view of Article content type and then follow the below steps.


Into view Header part add field Global: Result summary 
Now into above field configuration, inside Display text area add @total token.