Count User Posts with Custom Post Type

At the moment count_user_posts() is a handy function that return user post count however it only return ‘post’ post-type, (wish of way to add custom post type?) while digging I saw a light, I found a trac that WordPress is working on allowing custom post types 8 weeks ago and unfortunately is still not available to the public yet or the current version 3.8.1, hoping it will come in 3.9.

So for now I’ve created a function as an easy alternative.

How to use?

Happy coding ^_^

by Ryan Sutana