code: def test_rolling_count(window_length, gap, window_series_pd):
      gap_num = get_number_from_offset(gap)
      window_length_num = get_number_from_offset(window_length)
  
      expected_vals = apply_rolling_agg_to_series(
          window_series_pd,
          lambda x: x.count(),
          window_length_num,
          gap=gap_num,
      )
  
      primitive_instance = RollingCount(
          window_length=window_length,
          gap=gap,
          min_periods=window_length_num,
      )
      primitive_func = primitive_instance.get_function()
  
      actual_vals = pd.Series(primitive_func(window_series_pd.index))
  
      num_nans = gap_num + window_length_num - 1
      assert actual_vals.isna().sum() == num_nans
      # RollingCount will not match the exact roll_series_with_gap call,
      # because it handles the min_periods difference within the primitive
      pd.testing.assert_series_equal(
          pd.Series(expected_vals).iloc[num_nans:],
          actual_vals.iloc[num_nans:],
      )
  
file_path: featuretools/featuretools/tests/primitive_tests/aggregation_primitive_tests/test_rolling_primitive.py
imports: import numpy
  import pandas
  import pytest
  from featuretools.primitives import RollingCount, RollingMax, RollingMean, RollingMin, RollingOutlierCount, RollingSTD, RollingTrend
  from featuretools.primitives.standard.transform.time_series.utils import apply_rolling_agg_to_series
  from featuretools.tests.primitive_tests.utils import get_number_from_offset
label_desc: Use image node_id 5 for calling a global function with example usage: test_rolling_count(window_length, gap, window_series_pd) without return types