Added support for retrieving number of instances of a runnable.