I am interfacing arduino nano with PC. I am only applying external power to controller(not through USB). When I am giving power to arduino with PC not connected to arduino through USB, arduino starts booting and built in LED of controller continuously blinks for 12-12 times immediately after power ON. In a case where I have USB connected to controller, booting of arduino starts after 5-6 seconds of power ON.
If I am using interrupt, is there a chance that controller misses count during bootloading??
While the bootloader is running, your sketch has not run yet. setup() has not run, so no interrupts are enabled at that point, so none will be recorded.
Also - "bootloading" is probably not the right word to use there; that term generally refers to the process of writing the bootloader to a board, not when the bootloader runs after reset.
I seem to recall that optiboot does not run at power up it detects a cold start and skips the 2-second delay during which the serial bootloader is available. or... does the nano use optiboot?
nop, but after stock is out it will. Anyway, that should be sufficient clues to help fix the problem.
The official Nano is using optiboot as of "quite recently." (thus the presence of a Process/Old Bootloader option in the tools menu.) Previous versions of the official nano used ATmegaBoot (the "old" bootloader from pre-Uno days.) The many "Nano Clones" could be running anything, but I think most are running the "old bootloader." (note that there are about three different versions of the "old bootloader" floating around - with and without watchdog fixes and/or "fast start" modification."
optiboot does not run at power up it detects a cold start and skips the 2-second delay
That's correct. Optiboot only runs after an "external reset."