Fix error when count type not found in API