code: def str_count(s):
      """
      Count the number of Chinese characters,
      a single English character and a single number
      equal to half the length of Chinese characters.
      args:
          s(string): the input of string
      return(int):
          the number of Chinese characters
      """
      import string
  
      count_zh = count_pu = 0
      s_len = len(s)
      en_dg_count = 0
      for c in s:
          if c in string.ascii_letters or c.isdigit() or c.isspace():
              en_dg_count += 1
          elif c.isalpha():
              count_zh += 1
          else:
              count_pu += 1
      return s_len - math.ceil(en_dg_count / 2)
  
file_path: PaddleHub/modules/image/text_recognition/chinese_ocr_db_crnn_mobile/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import math
  from io import BytesIO
  import cv2
  import numpy
  from PIL import Image
  from PIL import ImageDraw
  from PIL import ImageFont
label_desc: Use image node_id 3 for calling a global function with example usage: str_count(s) and returns: unknown