def _c13_num(pep_query, isolation_mz):
    """
    Counts the number of C13 atoms in a query, based on the mass-error between
    the expected and isolated m/z values.

    Parameters
    ----------
    pep_query : :class:`PeptideQuery<pycamv.pep_query.PeptideQuery>`
    isolation_mz : float

    Returns
    -------
    int
    """
    return int(round(pep_query.pep_exp_z * abs(pep_query.pep_exp_mz -
        isolation_mz)))
