How Does The Count Function Work In Python