This is one method, it will at the very least give you a basis to create your own code should it give you exactly the result set you are looking for:
http://www.sqlwebpedia.com/content/sql-replication-undelivered-command-count
MCITP SQL 2005, MCSA SQL 2012