Add event counting function to Picture