Add mode detection to Count()

The g<C-G> shows a different thing in Visual modes.
So I changed the function to handle that.