def pluralize(count, item_type):
  """Pluralizes the item_type if the count does not equal one.

  For example `pluralize(1, 'apple')` returns '1 apple',
  while `pluralize(0, 'apple') returns '0 apples'.

  :return The count and inflected item_type together as a string
  :rtype string
  """
  def pluralize_string(x):
    if x.endswith('s'):
      return x + 'es'
    else:
      return x + 's'

  text = '{} {}'.format(count, item_type if count == 1 else pluralize_string(item_type))
  return text