original_string: public static function count_records_for_template($templateid, $status) {
          $filters = array('templateid' => $templateid);
          if ($status > 0) {
              $filters['status'] = $status;
          }
          return self::count_records($filters);
      }
code: public static function count_records_for_template($templateid, $status) {
          $filters = array('templateid' => $templateid);
          if ($status > 0) {
              $filters['status'] = $status;
          }
          return self::count_records($filters);
      }
code_tokens: public static function count_records_for_template ( $ templateid , $ status ) { $ filters = array ( 'templateid' => $ templateid ) ; if ( $ status > 0 ) { $ filters [ 'status' ] = $ status ; } return self :: count_records ( $ filters ) ; }
docstring: Count the number of plans for a template, optionally filtering by status.
  
  @param  int $templateid The template ID
  @param  int $status The plan status. 0 means all statuses.
  @return int
docstring_tokens: Count the number of plans for a template optionally filtering by status .