How can I count the number of nodes submitted by the current user? I want to expose in a block the number of content type published by the current user.
I know we can write a query, but is there any other method to do it?
You can use the Views module to do this.


Create a new view
Remove sort options, fields and other default settings
Add a field for "Content: Type"
Expand the "advanced" part on the right and set "Use aggregation" to "Yes"
Add yet another field for "Content: Type"
On the second "Content: Type" field, click "Aggregation settings"
Set the aggregation type to "count"
The second "Content: Type" should now look like "COUNT(Content: Type)"


THIS IS NOT MY SOLUTION LOOK HERE: Count of nodes by type