Added the option to include Subentities in a count.