Updated function for getting machine name for a type to be able to return types. REOL-69
Updated to find number of items for each type, instead of finding x number of items in total. REOL-69