Hi Mojtaba
There is no native method which could do this. While you can return number of all documents in the sub-tree, like this:
{% CurrentDocument.AllChildren.Count |(identity)GlobalAdministrator%}
The AllChildren object does not support filtering, so categories would be counted in the result.
The only solution in this case is to create and register a Custom Macro Method, and calculate number of child nodes which represent a product using the API.
Examples of how to retrieve a DataSet of documents based on a where condition can be found in the API Examples module, which is part of a Kentico installation