how to get number of selected vertex and the number of total vertex with python?
You have multiple questions there:

import bpy
import bmesh


obj = bpy.context.active_object
if bpy.context.mode == 'EDIT_MESH':
    bm = bmesh.from_edit_mesh(obj.data)
    verts = [ v.index for v in bm.verts if v.select ]
else:
    verts = [ v.index for v in obj.data.vertices if v.select ]

print(verts)
print(len(obj.data.vertices))


and for the second question:

bpy.context.scene.objects.active = bpy.data.objects[name]
# fix shortcoming identified by Omar :
for obj in bpy.context.scene.objects:
    obj.select = ( obj == bpy.context.scene.objects.active)