How to output the number of vertices, edges and faces given a polygon with Python?
You can get the active object for instance:

ob = bpy.context.object


And get its data (if it's a mesh object, the mesh datablock):

me = ob.data


Mesh element counts:

len(me.vertices)
len(me.edges)
len(me.polygons) # faces


Vertex count of a single face:

len(me.polygons[0].vertices)