Counts divergent transitions recorded by an HMC/NUTS fit, reading whichever
field the backend populated (the top-level $divergent flag vector every
sampler in this package writes, or $diagnostics$divergent,
$diagnostics$divergent_idx, $diagnostics$n_divergent, $n_divergent).
It reads the same record plot_divergences() locates the divergent rows
from, so the two always agree on one fit.