original_string: public static function countByRequest(array $criteria = [])
      {
          if (!empty($condition = array_get($criteria, 'condition'))) {
              $params = array_get($criteria, 'params', []);
  
              return static::whereRaw($condition, $params)->count();
          }
  
          return static::count();
      }
code: public static function countByRequest(array $criteria = [])
      {
          if (!empty($condition = array_get($criteria, 'condition'))) {
              $params = array_get($criteria, 'params', []);
  
              return static::whereRaw($condition, $params)->count();
          }
  
          return static::count();
      }
code_tokens: public static function countByRequest ( array $ criteria = [ ] ) { if ( ! empty ( $ condition = array_get ( $ criteria , 'condition' ) ) ) { $ params = array_get ( $ criteria , 'params' , [ ] ) ; return static :: whereRaw ( $ condition , $ params ) -> count ( ) ; } return static :: count ( ) ; }
docstring: Performs a COUNT query based on query criteria supplied from api request.
  
  @param array $criteria
  
  @return int
docstring_tokens: Performs a COUNT query based on query criteria supplied from api request .