import torch


def correct(outputs: torch.FloatTensor,
            labels: torch.LongTensor) -> int:
    """Return number of correct output values along the batch dimension.

    An instance is correct if `argmax(output[i]) == label[i]` for `i`.

    Args:
        outputs: outputs from a model with shape BxO
        labels: column vector of shape Bx1

    """
    return int(torch.sum(outputs.argmax(1) == labels).item())