def count_jailed(model):
    """Count number of jailed agents."""
    count = 0
    for agent in model.schedule.agents:
        if agent.breed == "citizen" and agent.jail_sentence:
            count += 1
    return count