Easier count handling

Change-Id: I464047d4659163a7db946d7505161b99379ea3ff
Handle Ctrl-c gracefully

Change-Id: I992a0c52f7e840a96d4d4ee62e1c533d46eb8da9