@staticmethod
def _count_colour(colour, image):
    """
        Counts the number of pixels of a certain colour in an image.

        :param colour: The colour to look for.
        :param image: The image to look for the colour in.
        :return: The number of pixels in `image` of colour `colour`.
        """
    return len([(1) for pixel in image.getdata() if pixel == colour])
