You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: count.rs
    path of file: ./repos/polars/crates/polars-plan/src/logical_plan/functions
    
    the code of the file until where you have to start completion: #[cfg(feature = "ipc")]
use arrow::io::ipc::read::get_row_count as count_rows_ipc;
#[cfg(feature = "parquet")]
use polars_io::cloud::CloudOptions;
#[cfg(feature = "csv")]
use polars_io::csv::count_rows as count_rows_csv;
#[cfg(all(feature = "parquet", feature = "cloud"))]
use polars_io::parquet::ParquetAsyncReader;
#[cfg(feature = "parquet")]
use polars_io::parquet::ParquetReader;
#[cfg(all(feature = "parquet", feature = "async"))]
use polars_io::pl_async::{get_runtime, with_concurrency_budget};
#[cfg(feature = "parquet")]
use polars_io::{is_cloud_url, SerReader};

use super::*;

#[allow(unused_variables)]
pub fn count_rows(paths: &Arc<[PathBuf]>, scan_type: &FileScan) -> PolarsResult<DataFrame> {
    match scan_type {
        #[cfg(feature = "csv")]
        FileScan::Csv { options } => {
            let n_rows: PolarsResult<usize> = paths
                .iter()
                .map(|path| {
                    count_rows_csv(
                        path,
                        options.separator,
                        options.quote_char,
                        options.comment_prefix.as_ref(),
                        options.eol_char,
   
    
pub fn count_rows(paths: &Arc<[PathBuf]>, scan_type: &FileScan) -> PolarsResult<DataFrame> {
    match scan_type {
        #[cfg(feature = "csv")]
        FileScan::Csv { options } => {
            let n_rows: PolarsResult<usize> = paths
                .iter()
                .map(|path| {
                    count_rows_csv(
                        path,
                        options.separator,
                        options.quote_char,
                        options.comment_prefix.as_ref(),
                        options.eol_char,
                        options.has_header,
                    )
                })
                .sum();
            Ok(DataFrame::new(vec![Series::new("len", [n_rows? as IdxSize])]).unwrap())
        },
        #[cfg(feature = "parquet")]
        FileScan::Parquet { cloud_options, .. } => {
            let n_rows = count_rows_parquet(paths, cloud_options.as_ref())?;
            Ok(DataFrame::new(vec![Series::new("len", [n_rows as IdxSize])]).unwrap())
        },
        #[cfg(feature = "ipc")]
        FileScan::Ipc { options } => {
            let n_rows: PolarsResult<i64> = paths
                .iter()
                .map(|path| {
                    let mut reader = polars_utils::open_file(path)?;
                    count_rows_ipc(&mut reader)
                })
                .sum();
            Ok(DataFrame::new(vec![Series::new("len", [n_rows? as IdxSize])]).unwrap())
        },
        FileScan::Anonymous { .. } => {
            unreachable!();
        },
    }
}