But is it smart enough to know it needs to write some Python to count for it?

That ability to create ad hoc tools makes up for a lot of shortfalls.