original_string: public static function count_lti_tools($params = array()) {
          global $DB;
  
          $sql = "SELECT COUNT(*)
                    FROM {enrol_lti_tools} elt
                    JOIN {enrol} e
                      ON elt.enrolid = e.id";
          if ($params) {
              $where = "WHERE";
              foreach ($params as $colname => $value) {
                  $sql .= " $where $colname = :$colname";
                  $where = "AND";
              }
          }
  
          return $DB->count_records_sql($sql, $params);
      }
code: public static function count_lti_tools($params = array()) {
          global $DB;
  
          $sql = "SELECT COUNT(*)
                    FROM {enrol_lti_tools} elt
                    JOIN {enrol} e
                      ON elt.enrolid = e.id";
          if ($params) {
              $where = "WHERE";
              foreach ($params as $colname => $value) {
                  $sql .= " $where $colname = :$colname";
                  $where = "AND";
              }
          }
  
          return $DB->count_records_sql($sql, $params);
      }
code_tokens: public static function count_lti_tools ( $ params = array ( ) ) { global $ DB ; $ sql = "SELECT COUNT(*)
                    FROM {enrol_lti_tools} elt
                    JOIN {enrol} e
                      ON elt.enrolid = e.id" ; if ( $ params ) { $ where = "WHERE" ; foreach ( $ params as $ colname => $ value ) { $ sql .= " $where $colname = :$colname" ; $ where = "AND" ; } } return $ DB -> count_records_sql ( $ sql , $ params ) ; }
docstring: Returns the number of LTI tools.
  
  @param array $params The list of SQL params (eg. array('columnname' => value, 'columnname2' => value)).
  @return int The number of tools
docstring_tokens: Returns the number of LTI tools .