gpath: Add -c/--count option

d523c5a8-463f-11e4-8771-c80aa9e67bbd