Compares cohort_counts against explicitly supplied expected
counts and errors on any disagreement. Call it before any analysis that
would otherwise run happily on an unreconciled cohort.
Examples
d <- data.frame(dead = c(1, 1, 0, 0, 0), iv_dead = 1:5)
expected <- list(n = 5L, n_events = 2L, n_censored = 3L)
assert_cohort(d, expected, event = "dead", time = "iv_dead")