Human: count number of pixels in string. Assistant: 
Here is a Python code to count number of pixels in string

import string

def count_pixels(text):
    """Count number of pixels in string.

    :param str text:
    :rtype: int
    :return:
    """
    return len(text)

# Enter the string
text = "This is a string"

# Calling the function
print((count_pixels(text)))

#Example Output
# 16

#Remember to inspect code for bugs.