Why is count in quotes and how does hasattr work in an if statement?

for element in how_many_s:
if hasattr(element, “count”):
print(element.count(“s”))

Can anyone explain why “count” in hasattr(element, “count”) has to be a string? I thought we were checking if it was an attribute?