Impelements type counting and scaling functions.