This is to show why verifiable examples are needed.
One could surely think of a datastructure where the code from the question actually produces the desired result, as seen in the following.
import numpy as np; np.random.seed(1)
import matplotlib.pyplot as plt
class C(list):
def __init__(self, l):
self.curr = 0
list.__init__(self, l)
self.get = list.__getitem__
def plot(self, kind, color):
plt.bar(range(len(self)), self, color=color)
def __getitem__(self,index):
self.curr = self.index(index)
return self
def count(self):
return self.get(self,self.curr)
df = C(list(np.random.rand(15)*80000))
# unchanged code from the question
df.plot(kind='bar', color=['powderblue' if df[e].count() < 40000 else 'red' for e in df])
plt.show()

Hence it is important to clearify what is what by providing a mcve.