original_string: public static function count_blocked_users($user = null) {
          global $USER, $DB;
  
          if (empty($user)) {
              $user = $USER;
          }
  
          $sql = "SELECT count(mub.id)
                    FROM {message_users_blocked} mub
                   WHERE mub.userid = :userid";
          return $DB->count_records_sql($sql, array('userid' => $user->id));
      }
code: public static function count_blocked_users($user = null) {
          global $USER, $DB;
  
          if (empty($user)) {
              $user = $USER;
          }
  
          $sql = "SELECT count(mub.id)
                    FROM {message_users_blocked} mub
                   WHERE mub.userid = :userid";
          return $DB->count_records_sql($sql, array('userid' => $user->id));
      }
code_tokens: public static function count_blocked_users ( $ user = null ) { global $ USER , $ DB ; if ( empty ( $ user ) ) { $ user = $ USER ; } $ sql = "SELECT count(mub.id)
                    FROM {message_users_blocked} mub
                   WHERE mub.userid = :userid" ; return $ DB -> count_records_sql ( $ sql , array ( 'userid' => $ user -> id ) ) ; }
docstring: Count the number of users blocked by a user.
  
  @param \stdClass $user The user object
  @return int the number of blocked users
docstring_tokens: Count the number of users blocked by a user .