"""Shared lightweight stats helpers for lazy processed pipelines."""

from __future__ import annotations

import polars as pl


def count_rows(lf: pl.LazyFrame) -> int:
    """Count rows in a LazyFrame (forces a small collect)."""
    return int(lf.select(pl.len()).collect().item())
