add retry-count in general.py

implement retry-coutn in general.py;
update doc and add test fixtures

Change-Id: Ifeb4fb645ad0e4bc12d41ef4481aca1888a4041a