pub async fn get_storage_logs_row_count(
        &mut self,
        at_l2_block: L2BlockNumber,
    ) -> DalResult<u64> {
        let row = sqlx::query!(
            r#"
            SELECT
                COUNT(*) AS COUNT
            FROM
                STORAGE_LOGS
            WHERE
                MINIBLOCK_NUMBER <= $1
            "#,
            i64::from(at_l2_block.0)
        )
        .instrument("get_storage_logs_row_count")
        .with_arg("at_l2_block", &at_l2_block)
        .report_latency()
        .expect_slow_query()
        .fetch_one(self.storage)
        .await?;
        Ok(row.count.unwrap_or(0) as u64)
    }
Returns the total number of rows in the `storage_logs` table before and at the specified L2 block.

**Warning.** This method is slow (requires a full table scan).
core/lib/dal/src/storage_logs_dal.rs