Do I understand correctly that you want to count number of generated tags with class .flot-base here?

Would be good to comment what's happening here since it isn't obvious + I would prefer exact comparison (toBe(X)).