Adding keyframes to array modifer
When using keyframe_insert() you want to use it on the object that contains the value you wish to keyframe.

By "object" I am referring to python objects (as in "object" oriented programming) that are defined in a python class, not the visible 3d objects. In your example the object that has the value to be keyed is the modifier.

So to keyframe the count value in the array modifier you want to use -

obj.modifiers['Array'].keyframe_insert('count')


You might also think of it as the class containing the property to be keyframed is the one that gets told to insert the keyframe.

As mentioned by pink vertex you can also go through the parent by using

obj.keyframe_insert('modifiers["Array"].count')


Note the quotes " must be inside ' - swapping them around doesn't work.