async def METHOD_NAME(
    view: foc.SampleCollection, input: Count
) -> t.Tuple[t.Callable[[t.List], CountResponse], foa.Count]:
    field = view.get_field(input.field)
    while isinstance(field, fo.ListField):
        field = field.field
    def resolve(count: int):
        return CountResponse(count=count)
    return resolve, foa.Count(input.field)